Question: 1 - The operation ++ in Java means: Select one: a. That the value of 1 is added to the variable b. That the program

1 - The operation ++ in Java means:

Select one:

a. That the value of 1 is added to the variable

b. That the program should start executing from the beginning

c. That this line is a comment

d. That the value should be raised to the power of 2

2 - The rules that determine what is allowed in a program are known as the ____ of the language.

Select one:

a. syntax

b. grammar

c. semantics

d. pragmatics

3 - Variables of the type short can have values in the range of:

Select one:

a. integers between -128 and 127 inclusive

b. integers in the range -32768 and 32767

c. integers in the range -2147483648 and 2147483647

d. integers in the range -1024 and 1024

4 - The size of a variable of type double is:

Select one:

a. 8 bytes

b. 4 bytes

c. 2 bytes

d. 16 bytes

5 - A language that generates a syntax error when you try to put a different data type into a variable that it has not be declared for is called a ________ language.

Select one:

a. strongly typed

b. weak typed

c. static typed

d. dynamic typed

6 - Which of the following is an object type?

Select one:

a. byte

b. boolean

c. char

d. String

7 - What output will the following code produce:

int x, y;

boolean sameSign;

x=1;

y=1;

sameSign = ((x>0)==(y>0));

System.out.println(sameSign);

Select one:

a. true

b. 1

c. 0

d. false

8 - A memory location that has been given a name is called a:

Select one:

a. variable

b. type

c. object

d. class

9 - Which of the following is NOT a primitive data type.

Select one:

a. short

b. byte

c. double

d. String

10 - In Java, a variable of type long is ___ bytes in size.

Select one:

a. 2 bytes (16 bits)

b. 4 bytes (32 bits)

c. 8 bytes (64 bits)

d. 1 Byte (8 bits)

11 - A variable of type 'float' is represented in ___ bytes:

Select one:

a. 2 bytes (16 bits)

b. 4 bytes (32 bits)

c. 8 bytes (64 bits)

d. 1 Byte (8 bits)

12 - In java, a variable can only be used in a program if it has first been:

Select one:

a. declared

b. initialized

c. strongly typed

d. instantiated

13 - Subroutines in Java are often referred to as:

Select one:

a. subprograms

b. classes

c. objects

d. methods

14 - What output will the following code produce:

int counter;

counter = 5;

counter += 1;

System.out.println(counter);

Select one:

a. 5

b. 6

c. 0

d. None of the above

15 - What output would the following code produce?

enum Season { SPRING, SUMMER, FALL, WINTER } ;

Season vacation;

vacation = Season.SUMMER;

System.out.println(Season.SUMMER);

Select one:

a. SUMMER

b. Season.SUMMER

c. SPRING, SUMMER, FALL, WINTER

d. None of the above

16 - A statement with the following format

variable1 = ( x>=2) ? x++ : x--;

is employing a:

Select one:

a. conditional operator

b. boolean logic

c. type cast

d. relational operator

17 - True or False: The fetch and execute cycles always alternate?

Select one:

True

False

18 - True or False: A computer is built to carry out instructions that are written in a simple type of language called binary language.

Select one:

True

False

19 - True or False: A variable has a value that can not be changed by the program.

Select one:

True

False

20 - True or False: The word "public" when placed in front of a method declaration in java means that the routine can only be called from within the local class.

Select one:

True

False

21 - True or False: A variable of type boolean in java can have precisely two literals.

Select one:

True

False

22 - True or False: An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running.

Select one:

True

False

23 - True or False: Java programs are NOT compiled.

Select one:

True

False

24 - True or False: One of the components of a computer is its CPU, which converts the Input to the Output

Select one:

True

False

25 - True or False: A name for a constant value in java is called a literal.

Select one:

True

False

26 - True or False: An enum (enumerated type) is a example of an object type instead of a primitive type?

Select one:

True

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!