Computer Programming 2

Computer Programming 2

University

30 Qs

quiz-placeholder

Similar activities

Java Lab

Java Lab

University

25 Qs

Java

Java

University

25 Qs

Java - SET -1

Java - SET -1

University

25 Qs

JAVA BASIC 3

JAVA BASIC 3

University

35 Qs

VAC - Java -Applets and Servlets

VAC - Java -Applets and Servlets

University

25 Qs

Arrays in Java

Arrays in Java

University

25 Qs

programming quiz

programming quiz

University

25 Qs

Java basic

Java basic

University

25 Qs

Computer Programming 2

Computer Programming 2

Assessment

Quiz

Computers

University

Medium

Created by

John Manuel

Used 4+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A while loop carries on as long as...

The condition in the brackets is true

The condition in the brackets is false

i < 10

the for loop has not ended

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A while loop has the following format:

while (condition)

{

...

}

while

{

...

}

continue while (condition)

{

...

}

while [condition]

[

...;

]

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

OUTPUT?

int i = 1;

while (i < 4) {

System.out.println("Hello");

i++;

}

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

Hello

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the complete syntax of creating a class?

public class Main { }

public class Main() { }

public class Main

public class Main()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Methods are declared within a class.

True

False

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

static void myMethod(){ }

What is the name of the method?

static void myMethod

void myMethod

static myMethod

myMethod

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Who invented Java?

James Gosling

Taylor Swift

Steve Jobs

Bill Gates

Tim Berners-Lee

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?