Professional Documents
Culture Documents
One mark
a. + b. = c.== d.&&
int a = 5;
int b = 7;
System.out.println((a > b) ? "a is greater than b" : "a is less than or equal to b");
a) a is greater than b
b) a is less than or equal to b
c) compilation error
d) runtime error
5. Evaluate 6+3*2
a) 12 b)13 c)18 d) 36
a) + b)- c)* d) /
5 Marks
10 marks
1. Describe about any 3 types of operators in java
2. Write a program to find greatest of two numbers using conditional operator
3. Write short notes on expression and its precedencies
4. Explain about logical, assignment and bitwise operators in java with example
5. Write a program to find area of rectangle
UNIT IV
One Mark
7. The loop that executes the body of the loop atleast once is _____
a) While d)do while c)for d)switch
5 marks
1. Explain in detail about the types of if statement
2. Write a program to find greatest of two numbers using if statement
3. Describe about while loop with example
4. Write a program to find the year is leap year or not
5. Explain about switch statement with example
10 marks
1. Write in detail about the if statement with example
2. Explain in detail about the looping with proper example
3. Write a program to print the summation of even numbers
4. Write a program to print student mark list with nested if statement
5. Write a program to find sum of digits
6. Differentiate break and continue
7. Write a program to find summation of n numbers