github

Made bySaurav Hathi

MCQ Test Java: Basic Concepts 1

Q1:

What is the range of short data type in Java?

Tags:
Section:
Core Programming
Options:
Q2:

Which of the following are legal lines of java code?

1. int w = (int)888.8;

2. byte x = (byte)100L;

3. long y = (byte)100;

4. byte z = (byte)100L;

Tags:
Section:
Core Programming
Options:
Q3:

An expression involving byte, int and literal numbers is promoted to which of these in java?

Tags:
Section:
Core Programming
Options:
Q4:

Which data type value is returned by all transcendental math functions in java?

Tags:
Section:
Core Programming
Options:
Q5:

Which component is used to compile, debug and execute java program?

Tags:
Section:
Core Programming
Options:
Q6:

Which component is responsible for converting byte code into machine specific code in java?

Tags:
Section:
Core Programming
Options:
Q7:

Which statement is true about java?

Tags:
Section:
Core Programming
Options:
Q8:

What is the function of interpreter?

Tags:
Section:
Core Programming
Options:
Q9:

Which of the following is long data type literal in java?

Tags:
Section:
Core Programming
Options:
Q10:

Which of these can be returned by the operator & in java?

Tags:
Section:
Core Programming
Options:
Q11:

In java, literal can be of which of these data types?

Tags:
Section:
Core Programming
Options:
Q12:

Which one of these lists contains all the keywords supported by Java programming language?

Tags:
Section:
Core Programming
Options:
Q13:

public interface Foo

{

int k = 4; // Line 1 

}

Which three piece of codes are equivalent to line 1?

1. final int k = 4;

2. public int k = 4;

3. static int k = 4;

4. abstract int k = 4;

5. volatile int k = 4;

6. protected int k = 4;

Tags:
Section:
Core Programming
Options:
Q14:

What is the numerical range of a char in java?

Tags:
Section:
Core Programming
Options:
Q15:

Which of the following are legal declarations for classes and interfaces in java?

1. final abstract class Test {}

2. public static interface Test {}

3. final public class Test {}

4. protected abstract class Test {}

5. protected interface Test {}

6. abstract public class Test {}

Tags:
Section:
Core Programming
Options:
Q16:

Which of these is necessary condition for automatic type conversion in Java?

Tags:
Section:
Core Programming
Options:
Q17:

What is Truncation is Java?

Tags:
Section:
Core Programming
Options:
Q18:

Which operator is used to invert all the digits in binary representation of a number in java?

Tags:
Section:
Core Programming
Options:
Q19:

Which of these statements are incorrect?

Tags:
Section:
Core Programming
Options:
Q20:

Which datatype should be the result of expression1, so that the following expression works fine in java?

expression1 ?  expression2  :  expression3

Tags:
Section:
Core Programming
Options: