You are on page 1of 1

SECTION A (40 MARKS)

Answer all the questions


1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)

14)
15)

16)
17)

[ 2 marks each Q 1 to 16].

Explain java is architecture neutral.


Explain polymorphism
What is object oriented language?
What do you understand by JVM?
Mention a few rules for naming an identifier?
What are keywords and identifiers?
Mention the different datatypes.
What is dynamic initialization of a variable? Give an example.
What is type conversion? Give an example for each type.
What is operator associativity?
Write the ASCII value range for A to Z and a to z.
What is ternary operator? Write the syntax.
Evaluate the following and write the output.
Int a=15,b=20,c=30;
Int d=++a + b++ - --c;
System.out.println(Output is +d);
System.out.println(a+ \t +b +\t +z);
Identify which of the following are valid identifier. Give reason if invalid.
a) int
b) sum c) 5abc d) xy$z$e
Write the output for the following
Float i=10.5;
Float=n= i++ % 10;
System.out.println(n);
System.out.println(i)
What does scanner class nextInt( ) and nextLine( ) do?
What are the differences between if and switch statements?

18) write the java expression for the given mathematical expression
a) (a+b)
b) a/b2 c) (a+b)*(a-b) d) 3x2+2/5

[ 4 marks ]
[ 4 marks ]

SECTION B
Answer all the questions [ 15 marks each ]
1)

Write a java program to input employee name and basic salary and calculate the gross pay and net pay based on the following.

DA = 40% of basic, HRA = 10% of basic, PF = 8.33% of basic, Gross = Basic + HRA+ DA, Net = Gross PF.

You might also like