1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
A Java class can have multiple methods called “main”, but with formal parameters of different types.
True
pwd is a command telling bash to display the path to the current working directory.
True
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
A non-void method must contain at least one return
True
A void method must contain at least one return statement.
False
The body of a method contains the executable part of that method.
True
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
When calling a Java method, an actual parameter needs to be supplied for every formal parameter.
True
A void method in a Java program does not return a value.
True
int\[\] a,b\[\],c; is equivalent with: int a\[\], b\[\]\[\],c\[\];
True
int\[\] a,b\[\],c; is equivalent with: int a\[\], b\[\],c;
False
A while loop is classified as a pre-test loop.
True
A do-while loop is classified as a pre-test loop.
False
Variables in Java can be declared in a body of some method, as formal parameter, or in a class outside methods.
True
The row i of a 2D ragged array of integers can be emptied with row\[i\] = new int\[0\]
True
A Java program may have a single method main(String\[\]) in a class.
True
The return type of a non-void method can be String.
True
Execution begins in the method main(String\[\]) when there are no initialized static variables.
True
Execution begins with the initialization of static variables, before the method main(String\[\]) when there are no initialized static variables.
True
System.in is a static member encapsulating the opened standard input file of the process
True
The formal parameters for a method need not be of the same type.
True
The type of each actual parameter must match, or be compatible with, the type of the corresponding formal parameter.
True
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
The number of symbols that can be represented on k bits is 2^k.
True
A byte has 8 bits.
True
A byte has 16 bits.
False
A kilometer has 1000 meters
True
A megabyte is a million bytes.
True
A megabyte is a billion bytes.
False
A gigabit is a billion bits
True