How To Exam?

a knowledge trading engine...


Amity University 2008 B.E Computer Science JAVA (Data types,variables and Arrays) - Question Paper

Tuesday, 15 January 2013 08:30Web
16) What is the value of a[3] as the outcome of the subsequent array declaration?
a. 1
b. 2
c. 3
d. 4
Ans : d
17) Which of the subsequent are primitive types?
a. byte
b. String
c. integer
d. Float
Ans : a.
18) What is the range of the char type?
a. 0 to 216
b. 0 to 215
c. 0 to 216-1
d. 0 to 215-1
Ans. d
19) elaborate primitive data types?
Ans : byte, short, int, long
float, double
boolean
char
20) elaborate default values of various primitive types?
Ans : int - 0
short - 0
byte - 0
long - 0 l
float - 0.0 f
double - 0.0 d
boolean - false
char - null
21) Converting of primitive kinds to objects can be explicitly.
a)True
b)False
Ans: b.
22) How do we change the values of the elements of the array?
Ans : The array subscript expression can be used to change the values of the elements of the array.
23) What is final varaible?
Ans : If a variable is declared as final variable, then you can not change its value. It becomes constant.
24) What is static variable?
Ans : Static variables are shared by all instances of a class.


Operators available in Java
1) elaborate operators and elaborate the different kinds of operators available in Java?
Ans: Operators are special symbols used in expressions.
The subsequent are the kinds of operators:
Arithmetic operators,
Assignment operators,
Increment & Decrement operators,
Logical operators,
Biwise operators,
Comparison/Relational operators and
Conditional operators
2) The ++ operator is used for incrementing and the -- operator is used for
decrementing.
a)True
b)False
Ans: a.
3) Comparison/Logical operators are used for testing and magnitude.
a)True
b)False
Ans: a.
4) Character literals are stored as unicode characters.
a)True
b)False
Ans: a.
5) elaborate the Logical operators?
Ans: OR(|), AND(&), XOR(^) AND NOT(~).
6) What is the % operator?
Ans : % operator is the modulo operator or reminder operator. It returns the reminder of dividing the 1st operand by 2nd operand.
7) What is the value of 111 % 13?
a. 3
b. 5
c. 7
d. 9
Ans : c.
8) Is &&= a valid operator?
Ans : No.
9) Can a double value be cast to a byte?



( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Amity University 2008 B.E Computer Science JAVA (Data types,variables and Arrays) - Question Paper