Lets explore Java

Lets explore Java

University

14 Qs

quiz-placeholder

Similar activities

Briefing Operator Java

Briefing Operator Java

University

10 Qs

JAVA - Arrays

JAVA - Arrays

University - Professional Development

15 Qs

CMP128 Java Ch. 05 Methods

CMP128 Java Ch. 05 Methods

University

10 Qs

Java Quiz 3

Java Quiz 3

University

15 Qs

Java Quiz 1

Java Quiz 1

University

10 Qs

Teks dan Desktop Berbasis Objek

Teks dan Desktop Berbasis Objek

University

10 Qs

Java Displaying Data & Data Types

Java Displaying Data & Data Types

University - Professional Development

12 Qs

PBO Inheritance Episode 2

PBO Inheritance Episode 2

University

18 Qs

Lets explore Java

Lets explore Java

Assessment

Quiz

Computers

University

Hard

Created by

Mrs. Faiza Hashim

Used 4+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the below is valid way to instantiate an array in java?

int myArray [] = {1, 3, 5};

int [] myArray = {“1”, “2”, “3”};

int myArray [] [] = {1,2,3,4};

int [] myArray = (5, 4, 3);

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the below are reserved keyword in Java?

Array

goto

null

None of the above

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What are the valid statements for static keyword in Java?

We can have static block in a class.

The static block in a class is executed every time an object of class is created.

We can have static method implementations in interface.

We can define static block inside a method.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is correct syntax for main method of a java class?

public static int main(String[] args)

public int main(String[] args)

public static void main(String[] args)

None of the above.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a Java features?

Dynamic

Architecture Neutral

Use of pointers

Object-oriented

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way of writing println() function in Java?

System.out.println("Message = " + variable);

System.println("Message = " + variable);

System.output.println("Message = " + variable);

System.println.out("Message = " + variable);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct difference between print() and println()?

print() prints the output and move to new line, println() prints the output and stays on same line

print() prints the output and stays on same line, println() prints the output and move to new line

None of the given

Both of the given

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?