- Write a code which prints in console “Welcome to the Java class!”.
- Write a java code to show the subtraction of two integer variables which are equals 15 and 10.
- Write a program that performs all operations like multiplication, addition, subtraction and division on two integers 5 and 10.
- Write a program that equates the following conditions, using nested if statement:
10 is greater than 5
1 is lesser than 5
10 can equal to 10, if it is greater than 5 - Write a program that prompts user to enter a number and print whether the number is less than 10 or not.
- Write a program that print the month’s name on the basis of an integer variable, passed in a switch case condition and if the integer value is not less than or equal to 12
than a default case should execute. - Write a program to print the following square pattern
****
****
**** - Write a program to print all numbers divisible by 3 upto 20 using while loop
- Write a program that prompts user to enter a number and print whether the number is less than 10 or not
- Write a program which performs the following:
Create a class AnimalInheritance which has eat() which prints “eating…”.
Create a class Snake that extends AnimalInheritance which has its own method Hiss() which prints “Hiss…”.
Create a Snake object and call methods eat() and Hiss() inside main() - Write a java program to show how to store and print the following String literals
“Java”, “is platform” ,“ ” , “independent” . - Write a program to create a variable which can store statistical data of 25 days in a continuous order.(Assume that the data is of double type).
- Write a program to count number of even integers in an array of type integers
- Write a program to create a list of Integer type, whose size is unknown
- Write a program to create and initialize the arraylist of type Integer and traverse it using Iterator Interface.