M2 Flashcards

1
Q

defines a class, a
template for an object of derived type
HelloWorld

A

class HelloWorld –

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

access specifier/modifier,

A

public –

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

the main
method is declared private so that it is
accessible as part of the public interface of
the program.

A

false public

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

state of the method

A

static –

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

void – It returns void because the Java

interpreter X.

A

does not expect to receive or

process any output from the class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
The X class is a part of the core 
Java  language package of the Application 
Programming Interface (API)
A

System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The X method
is one of dozens of methods in the System
class.

A

println

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

JAVA LANGUAGE FUNDAMENTALS

A

ØIdentifiers
ØKeywords
ØComments
ØData types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

X are names that are given by the
programmer as name of variables, methods
or functions, classes etc.

A

Identifiers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Java Comments are of three (3) types:

A

Java Comments are of three (3) types:
1. A single-line comment starting with //
2. A multi-line comment enclosed within /* */
3. A documentation or javadoc comment is
enclosed between /** and */

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

byte, short, int, long, float, double, boolean, char are

A

primitive data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

variable declaration syntax

A

; [= value;]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

assigning a value to a variable syntax

A

= value;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

X are used in
converting one data type (such as a
String) into another data type (such as
int or double).

A

Java Wrapper Classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

used in
wrapping a primitive value into an
object

A

Java Wrapper Classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

here:

System.out.print();

X is a public static field: it accepts output data

A

out

17
Q

here:

System.out.print();

X is a class

A

System

18
Q

It prints string inside the quotes

A

print() -

19
Q
It prints string inside the quotes similar 
like print() method. Then the cursor moves to the beginning 
of the next line
A

println() -

20
Q

It provides string formatting (similar to printf in

C/C++ programming).

A

printf() -

21
Q

used to restrict the output depending on the conversion. It specifies the number of digits of precision when outputting floating-point values or the length of a subtracting to extract from a string. Numbers are rounded to the specified precision.

A

printf() -

22
Q
The X class is used to get user input, and it is found in 
the java.util package.
A

Scanner