Professional Documents
Culture Documents
Assignment 2 - Vibuddha Vidarshana
Assignment 2 - Vibuddha Vidarshana
In "println()" curser moves to a new line after printing the line and in "print()" curser just moves to
next point after printing.
2.
3. There are 5 leterals in java.
· Integer literal
· Floating literals
· Character literals
· Boolean literals
· String literals
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14. Answe : d
15.Answer: c
program is to print two variables. So, for that two variables should be declared and innitialized in the
same line.
16. A
BCD
EF
G
17. 60
10+20+30
10+2030
102030
102030
3030
102030
Line 2 - this is same as line 1. 'B' can be "capital " or "simple" (prints 228)
19.
20.
class Quiz20{
21. b
22.
23. 10
20
30
200
24.
25.
26.
27. d
28. a, c
29. e
30. e
31. d
32. a