Question 1 

Overload methods must vary in their:

 a range

 b names

 c program placement

 d number of data types in their arguments.

Question 2 

Like most high-level programming languages, Java uses the one byte long ASCII code set for character representation.

True

False

Question 3 

True or False: Java enhances portability by consistently specifying the size and format of its primitive data types, regardless of the platform on which a Java program is running.

True

 False

Question 4 

If we want to allow a String to expand in size from its original size then we should use it to create an object of what class(es)?

a Character

b String

c StringBuilder or StringBuffer

 d Buffer

Question 5 

True or False: If you do not explicitly create a constructor for a Java class then Java creates a default constructor for you.

True

False

Question 6 

True or false: One of the advantages of Java abstraction is that in order to call the method of an object you only need to know its interface, not its implementation details.

True

 False

Question 7 

True or False: Instance variables can be static.

True

False

Question 8 

True or False:  One of the advantages of using a Java class is that all objects that are instantiated (created) from that class will have the same methods, therefore giving them the same "behavior."

True

False

Question 9 

True or False: To write a "definite loop" in Java, you use a loop control variable that has its value modified upon each iteration of the loop.

True

False

Question 10 

In order to force a conversion from one data type to another we can use:

a format controls

b unification

 c upward compatibility

 d casting

Question 11 

True or False: If you want to make sure that the code within the body of a loop may never get executed at all, you should use a do..while loop construct.

True

False

Question 12 

Which of these is not a Java primitive data type?

a char

 b number

c float

d boolean

Question 13 

The logical AND operator in java is:

 a and

 b l l

 c +

d &&

Question 14 

How are entire arrays passed from one method to another?

 a by value

b by reference

c both a and b

 d none of the above

Question 15 

True or False: Strings are an example of an immutable object.

 True

 False

Question 16 

The hiding of data within an object of a class is made possible by which object-oriented concept?

a inheritance

 b polymorphism

 c encapsulation

d none of the above

Question 17 

True or False: A non-void method must have a return statement that returns a value of the specified return type.

 True

 False

Question 18 

True or false: The logical OR operator has a higher precedence in Java than the logical AND, the conditional, and the equality operators.

True

 False

Question 19 

The portion of a program within which you can refer to a variable is called its

 a range

b scope

 c limits

 d abstraction block

Question 20 

True or False: The Java compiler converts source code into machine code that is specific to the host processor where it is being compiled.

True

False

 

 

 

 

    • 11 years ago
    A+ Answers
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      solvedg126.docx