Font size
WorksheetsWeek 4: Recap Java Programming
Total questions: 10
Worksheet time: 6mins
Which of the following is the correct way to write a class signature? (The line of code to create an application)
public class NameOfApplication{
public class NameOfApplication
public NameOfApplication{
Which of the following is the correct way to declare a variable to store an integer value named num1?
double num1;
int num1;
int double num1;
final int num1;
Fill in the missing blank:
keyboard=________ Scanner(System.in);
space
new
in
keyboard
Which is the correct naming convention for naming an application?
newApplication
NewApplication
newapplication
NEWAPPLICATION
What is the correct naming convention for naming a constant?
constantName
Constantname
ConstantName
CONSTANTNAME
What is the correct naming convention for naming a variable?
VariableName
variableName
VARIABLENAME
variablename
Fill in the missing blank?
num1= (a) .nextInt();
Which of the following is the correct way to import the Scanner class?
import java.Scanner;
java.util.Scanner;
import java.util.Scanner;
import javax.utily.*;
Which of the following can we use for Grey Pop Up windows?
Scanner
JOptionPane
keyboard
System.out.println
Fill in the missing space:
final ____________ FLOWERCOST=2.33;
double
int
char
String
