Which of the following is the correct method signature for the \'main\' method u
ID: 3912602 • Letter: W
Question
Which of the following is the correct method signature for the 'main' method used to allow a Java class to serve as a stand-along program?
Flag this Question
Question 20.05 pts
When you compile a java program, what is produced?
Flag this Question
Question 30.05 pts
When you compile a java program, what kind of file is produced?
Flag this Question
Question 40.05 pts
All java programming language statements must end with what?
Flag this Question
Question 50.05 pts
You have just written a program that compiles and runs without showing any error messages. However, it does not produce the correct results. What kind of error do you have?
Flag this Question
Question 60.05 pts
What is always present in a method call?
Flag this Question
Question 70.05 pts
Which of the following statements declares a new variable?
Flag this Question
Question 80.05 pts
Which of the following data types can represent any 8-digit integer value?
Flag this Question
Question 90.05 pts
Which of the following statements has a syntax error?
int count = 3; //statement A
double sum = 279.0; //statement B
double average = sum / count; //statement C
Flag this Question
Question 100.05 pts
What is the value of the variable ans after the following statements are executed?
int count = 5;
count++;
int ans = count;
count+=3;
ans--;
Flag this Question
Question 110.05 pts
What is the mechanism used in the second line of code below that allows a programmer to force an unsafe conversion between data types?
double size = 4.67;
int s = (int)size;
Flag this Question
Question 120.05 pts
Which of the following types listed is the widest?
Flag this Question
Question 130.05 pts
What are the data type and value of the following expression? 3 / 4
Flag this Question
Question 140.05 pts
Which of the following is a Java keyword?
Flag this Question
Question 150.05 pts
What type of characters are used to define the beginning and end of a Java class?
Flag this Question
Question 160.05 pts
What is true about a class name?
Flag this Question
Question 170.05 pts
What will be the output of the following program?
for ( int num2 = 1; num2 <=3; num2++ ) {
System.out.print( "Huskies! " );
for ( int num1 = 1; num1 <=3; num1++ ) {
System.out.print( "Go! " );
}
}
Flag this Question
Question 180.05 pts
What will be the output of the following program? (This is DIFFERENT from the previous question)
for ( int num2 = 1; num2 <=3; num2++ ) {
System.out.print( "Huskies! " );
}
for ( int num1 = 1; num1 <=3; num1++ ) {
System.out.print( "Go! " );
}
Flag this Question
Question 190.05 pts
How many times is the printstatement executed in the code below?
for (int i = 0; i < 8; i = i + 3){
for (int j = i; j > 0; j = j - 1)
System.out.print("*");
}
Flag this Question
Question 200.05 pts
The process of breaking a large programming task down into a series of smaller ones is called...
public static void main( String[ ] args )Explanation / Answer
Please find the answes below:
Which of the following is the correct method signature for the 'main' method used to allow a Java class to serve as a stand-along program?
public static void main( String[ ] args )
When you compile a java program, what is produced?
object code (also called bytecode)
When you compile a java program, what kind of file is produced?
a .class file
All java programming language statements must end with what?
a semicolon
You have just written a program that compiles and runs without showing any error messages. However, it does not produce the correct results. What kind of error do you have?
a logic error
What is always present in a method call?
parentheses
Which of the following statements declares a new variable?
All of the above
Which of the following data types can represent any 8-digit integer value?
int and long
Which of the following statements has a syntax error?
None of the above
What is the value of the variable ans after the following statements are executed?
5
What is the mechanism used in the second line of code below that allows a programmer to force an unsafe conversion between data types?
a cast
Which of the following types listed is the widest?
int
What are the data type and value of the following expression? 3 / 4
int, 0
Which of the following is a Java keyword?
static
What type of characters are used to define the beginning and end of a Java class?
Curly braces { }
What is true about a class name?
All of the above
What will be the output of the following program?
for ( int num2 = 1; num2 <=3; num2++ ) {
System.out.print( "Huskies! " );
for ( int num1 = 1; num1 <=3; num1++ ) {
System.out.print( "Go! " );
}
}
Huskies! Go! Go! Go! Huskies! Go! Go! Go! Huskies! Go! Go! Go!
What will be the output of the following program? (This is DIFFERENT from the previous question)
for ( int num2 = 1; num2 <=3; num2++ ) {
System.out.print( "Huskies! " );
}
for ( int num1 = 1; num1 <=3; num1++ ) {
System.out.print( "Go! " );
}
Huskies! Huskies! Huskies! Go! Go! Go!
How many times is the printstatement executed in the code below?
for (int i = 0; i < 8; i = i + 3){
for (int j = i; j > 0; j = j - 1)
System.out.print("*");
}
9
The process of breaking a large programming task down into a series of smaller ones is called...
procedural decomposition
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.