Java language is also known as a oki b oak c oop language d


Ques 1: - Java language is also known as

(a) oki

(b) oak

(c) oop language

(d) class language

Ques 2: - who was the developer of java

(a) Dennis Richards

(b) Berningham

(c) James gosling

(d) Martin Richard

Ques 3: - which is the first web browser to run java applets

(a) Netscape Navigator

(b) Internet Explorer

(c) Mozilla 

(d) Hot Java

Ques 4: Full form of JVM is

(a) Java Virtual machine

(b) Java very machine

(c) James virtual machine

(d) Java vending machine

Ques 5: Which one of these lists contains only Java programming language keywords?

(a) class, if, void, long, Int, continue

(b) goto, instanceof, native, finally, default, throws

(c) try, virtual, throw, final, volatile, transient

(d) strictfp, constant, super, implements, do

Ques 6: Which one of the following will declare an array and initialize it with five numbers?

(a) Array a = new Array(5);

(b) int [] a = {23,22,21,20,19};

(c) int a [] = new int[5];

(d) int [5] array;

Ques 7: How characters are initialized in java

(a) character a=new character();

(b)character a="dio";

(c) char c='d';

(d) char c="ert";

Ques 8: How to declare true, false value in java

(a) boolean a=true;

(b) String a="true";

(c) Char a="true";

(d) Boolean a=true

Ques 9: Which is a valid declarations of a String?

(a) String s1 = "hi";

(b) String s2 = 'null';

(c) String s3 = (String) 'abc';

(d) String s4 = (String) '\ufeed';

Ques 10.what is the range of char

(a) -128 to 127

(b) -32786 to 32767

(c) 2^3 to 2^5

(d) 0 to 32767

Que11.You can run the Java language on a particular operating system if:

(a) it's a Microsoft Operating System

(b) a Java Virtual Machine exists for that operating system

(c) a compiler exists for that operating system

(d)all of the above

Que12.What is the main difference between the JRE and the JDK?

(a) JDK does not include virtual machine and JRE does not include the run time tools

(b) JDK does not include virtual machine but JRE does include the run time tools

(c) JRE does not include the run time tools whereas

(d) JDK provides the run time environment for java programs and JRE provides the virtual macine

Que13.which command is used to compile the java programs

a) javap

b) java

c) javac

d) javacomp

Que 14. The Java interpreter is used for the execution of the source code.

a) True

b) False

c) cannot say

d) NA

Que 15. What is the return type of program's main( ) method?

a) int

b) char

c) void

d) String

Que 16. What are different comments?

a) // -- single line comment

b) /* -- */ multiple line comment

c) /** -- */ documentation

d)all of the above

Que 17. Variables in java are

a)which cannot change value during execution of program

b)which can change value during execution of the program

c)memory is only once allocated

d)none of the above

Que 19. In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?

a) It must have a package statement

b) It must be named Test.java

c) It must import java.lang

d) It must declare a public class named Test

Que20.which code is generated after compilation of the java program

a) machine code

b) assembly code

c) byte code

d) high level code

Que21. Comparison/Logical operators are used for testing and magnitude.

a) True

b) False

c) cannot say

Que22. Is &&= a valid operator?

a) No

b) yes

c) cannot say

Que 23. Character literals are stored as unicode characters

a) True

b) False

c) cannot say

Que24. What are the values of x and y ?

x = 5; y = ++x;

a) x=5,y=6

b) x=6,y=5

c) x=5,y=5

d) x = 6; y = 6

Que25. The switch statement does not require a break.

a) True

b) False

c) cannot say

Que26. How can class be imported to a program?

a) using keyword import

b) using keyword class

c) directly

d) all of the above

Que27 .Which of the following statements can be used to describe a public method?

a) It is accessible to all other classes in the hierarchy.

b) It is accessible only to subclasses of its parent class

c) It represents the public interface of its class

d) The only way to gain access to this method is by calling one of the public class methods

Que.28 By default, all program import the java.lang package.

a) True

b) False

c) Cannot say

Que29. Which of the following is not a wrapper class?

a) String

b) Integer

c) Boolean

d) Character

Que30.== this is equal operator

a) true

b) false

c) cannot say

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Java language is also known as a oki b oak c oop language d
Reference No:- TGS02399205

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)