Search Header Logo

Intro Programming: Chapter 2 Review

Authored by Christopher Hayden

Computers

9th - 12th Grade

Used 123+ times

Intro Programming: Chapter 2 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct header line for main in a Java program?

public static void main(args)
public static void main(String args)
public static void main(args [ ])
public static void main(String [ ] args)

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does a comment look like in Java?

//comment
\\comment
==comment
\comment

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

public class Sample{
public void Example{
//rest of code
} }
What is the name of the file?

Sample.java
sample.java
example.java
Example.java

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Assume the following code works as intended:
int a = 12;
a = a + 3;
Suppose we want to display the current value of a; what will that line of code be?

System.out.print(a);
System.out.print(12);
System.out.print("12");
System.out.print("a");

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

One of these words should be uppercase, but is currently lowercase; which word needs to be capitalized?
public class First{  
public static void main(String[ ] args)  {  system.out.printLn("this is a test!");  }}

public
main
this
system

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

public class Monday{  
< The header line for main >  
{   System.out.println("Greetings");  }}
What can be the name of the source file for this program?

Monday.java
monday.java
Monday.java or monday.java
any name with the extension .java

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Java is an example of a _________ programming language.

compiled
interpreted
compiled/interpreted
low level

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?