Deck 1: Java Programming Language

Full screen (f)
exit full mode
Question
Who is considered as the creator of JAVA ?

A)Dennis Richie
B)Ken Thompson
C)James Gosling
D)Bjarne Stroupstrup
Use Space or
up arrow
down arrow
to flip the card.
Question
Which of the following statements about the Java language is true?

A)Java supports only Procedural Oriented Programming approach
B)Both Procedural and Object Oriented Programming are supported in Java
C)Java supports only Object Oriented Programming approach
D)None of the Above
Question
JRE stands for

A)Java Realtime Environment
B)Java Rapid Enterprise
C)Java Runtime Environment
D)None of the above
Question
Java source files are compiled and converted to

A)Object code
B)machine code
C)Bytecode
D)executable file
Question
JVM is ___________for bytecode.

A)a compiler
B)an interpreter
C)assembler
D)none of the above
Question
What is the size of int data type in java?

A)1 bytes
B)2 bytes
C)4 bytes
D)8 bytes
Question
Which is a valid float literal?

A)1.23
B)2
C)1.23d
D)1.23f
Question
What is the numerical range of a char in Java?

A)-128 to 127
B)0 to 256
C)0 to 32767
D)0 to 65535
Question
Which of these coding types is used for data type char in Java?

A)ASCII
B)ISO-LATIN-1
C)UNICODE
D)None of the mentioned
Question
Which of these values can a boolean variable contain?

A)True & False
B)0 & 1
C)Any integer value.
D)Both a & b
Question
Which one of the following is a valid identifier in java?

A)x1
B)1x
C)$x
D)x 1
Question
Which operator is used to implement unsigned right shift of an integer?

A)<<
B)>>
C)<<<
D)>>>
Question
Which one of the following is a jump statement in java?

A)goto
B)jump
C)break
D)if
Question
Which of these operators is used to allocate memory to array variable in Java?

A)malloc
B)alloc
C)new
D)new malloc
Question
Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

A)do-while
B)while
C)for
D)None of the mentioned
Question
Which of these is necessary condition for automatic type conversion in Java?

A)The destination type is smaller than source type.
B)The destination type is larger than source type.
C)The destination type can be larger or smaller than source type.
D)None of the mentioned
Question
What is the error in this code?
Byte b = 50;
B = b * 50;

A)b can not store the result 2500, limited by its range.
B)* operator has converted b * 50 into int, which can not be converted to byte without casting.
C)b can not contain value 50.
D)No error in this code
Question
Which of these is an incorrect array declaration?

A)int arr[] = new int[5];
B)int [] arr = new int[5];
C)int arr[]; arr = new int[5];
D)int arr[] = int [5] new
Question
Which of these selection statements test only for equality?

A)if
B)switch
C)Both a & b
D)None of the mentioned
Question
Which of these are selection statements in Java?

A)if
B)for
C)continue
D)all of these
Question
Which of these jump statements can skip processing remainder of code in its body for a particular iteration?

A)break
B)return
C)exit
D)continue
Question
What is the value of the expression 2 & 3 ?

A)2
B)3
C)6
D)5
Question
What is the value of the expression 8 << 2 ?

A)2
B)32
C)1 6
D)5
Question
The keyword used to create a constant variable

A)const
B)static
C)final
D)none of these
Question
What is stored in the object obj in following lines of code?
Box obj;

A)Memory address of allocated memory of object.
B)NULL
C)Any arbitrary pointer
D)Garbage
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 1: Java Programming Language
1
Who is considered as the creator of JAVA ?

A)Dennis Richie
B)Ken Thompson
C)James Gosling
D)Bjarne Stroupstrup
James Gosling
2
Which of the following statements about the Java language is true?

A)Java supports only Procedural Oriented Programming approach
B)Both Procedural and Object Oriented Programming are supported in Java
C)Java supports only Object Oriented Programming approach
D)None of the Above
Java supports only Object Oriented Programming approach
3
JRE stands for

A)Java Realtime Environment
B)Java Rapid Enterprise
C)Java Runtime Environment
D)None of the above
Java Runtime Environment
4
Java source files are compiled and converted to

A)Object code
B)machine code
C)Bytecode
D)executable file
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
JVM is ___________for bytecode.

A)a compiler
B)an interpreter
C)assembler
D)none of the above
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
What is the size of int data type in java?

A)1 bytes
B)2 bytes
C)4 bytes
D)8 bytes
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
Which is a valid float literal?

A)1.23
B)2
C)1.23d
D)1.23f
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
What is the numerical range of a char in Java?

A)-128 to 127
B)0 to 256
C)0 to 32767
D)0 to 65535
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
Which of these coding types is used for data type char in Java?

A)ASCII
B)ISO-LATIN-1
C)UNICODE
D)None of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
Which of these values can a boolean variable contain?

A)True & False
B)0 & 1
C)Any integer value.
D)Both a & b
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
Which one of the following is a valid identifier in java?

A)x1
B)1x
C)$x
D)x 1
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
Which operator is used to implement unsigned right shift of an integer?

A)<<
B)>>
C)<<<
D)>>>
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
Which one of the following is a jump statement in java?

A)goto
B)jump
C)break
D)if
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
Which of these operators is used to allocate memory to array variable in Java?

A)malloc
B)alloc
C)new
D)new malloc
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

A)do-while
B)while
C)for
D)None of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
Which of these is necessary condition for automatic type conversion in Java?

A)The destination type is smaller than source type.
B)The destination type is larger than source type.
C)The destination type can be larger or smaller than source type.
D)None of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
What is the error in this code?
Byte b = 50;
B = b * 50;

A)b can not store the result 2500, limited by its range.
B)* operator has converted b * 50 into int, which can not be converted to byte without casting.
C)b can not contain value 50.
D)No error in this code
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
Which of these is an incorrect array declaration?

A)int arr[] = new int[5];
B)int [] arr = new int[5];
C)int arr[]; arr = new int[5];
D)int arr[] = int [5] new
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
Which of these selection statements test only for equality?

A)if
B)switch
C)Both a & b
D)None of the mentioned
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
Which of these are selection statements in Java?

A)if
B)for
C)continue
D)all of these
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
Which of these jump statements can skip processing remainder of code in its body for a particular iteration?

A)break
B)return
C)exit
D)continue
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
What is the value of the expression 2 & 3 ?

A)2
B)3
C)6
D)5
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
What is the value of the expression 8 << 2 ?

A)2
B)32
C)1 6
D)5
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
The keyword used to create a constant variable

A)const
B)static
C)final
D)none of these
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
What is stored in the object obj in following lines of code?
Box obj;

A)Memory address of allocated memory of object.
B)NULL
C)Any arbitrary pointer
D)Garbage
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 25 flashcards in this deck.