Quiz Methods Pre-test

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

A Java class can have multiple methods called “main”, but with formal parameters of different types.

True

2
New cards

pwd is a command telling bash to display the path to the current working directory.

True

3
New cards

The return type of a non-void method must match, or be compatible with, the type of any expression appearing in any return statement in that method.

True

4
New cards

A non-void method must contain at least one return

True

5
New cards

A void method must contain at least one return statement.

False

6
New cards

The body of a method contains the executable part of that method.

True

7
New cards

env is commonly used as the name of the third parameter of a main function in C and gives access to the environment variables.

True

8
New cards

When calling a Java method, an actual parameter needs to be supplied for every formal parameter.

True

9
New cards

A void method in a Java program does not return a value.

True

10
New cards

int\[\] a,b\[\],c; is equivalent with: int a\[\], b\[\]\[\],c\[\];

True

11
New cards

int\[\] a,b\[\],c; is equivalent with: int a\[\], b\[\],c;

False

12
New cards

A while loop is classified as a pre-test loop.

True

13
New cards

A do-while loop is classified as a pre-test loop.

False

14
New cards

Variables in Java can be declared in a body of some method, as formal parameter, or in a class outside methods.

True

15
New cards

The row i of a 2D ragged array of integers can be emptied with row\[i\] = new int\[0\]

True

16
New cards

A Java program may have a single method main(String\[\]) in a class.

True

17
New cards

The return type of a non-void method can be String.

True

18
New cards

Execution begins in the method main(String\[\]) when there are no initialized static variables.

True

19
New cards

Execution begins with the initialization of static variables, before the method main(String\[\]) when there are no initialized static variables.

True

20
New cards

System.in is a static member encapsulating the opened standard input file of the process

True

21
New cards

The formal parameters for a method need not be of the same type.

True

22
New cards

The type of each actual parameter must match, or be compatible with, the type of the corresponding formal parameter.

True

23
New cards

After a method terminates, the memory allocated to non-static local variables is de-allocated on stack, while static variables remain in the global space.

True

24
New cards

The number of symbols that can be represented on k bits is 2^k.

True

25
New cards

A byte has 8 bits.

True

26
New cards

A byte has 16 bits.

False

27
New cards

A kilometer has 1000 meters

True

28
New cards

A megabyte is a million bytes.

True

29
New cards

A megabyte is a billion bytes.

False

30
New cards

A gigabit is a billion bits

True