OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

quiz-placeholder

Similar activities

DWDM-2

DWDM-2

University

20 Qs

Tree and Planar Graph

Tree and Planar Graph

University

10 Qs

CodeMonkey for B.Ed IT

CodeMonkey for B.Ed IT

University

10 Qs

Cell Phone Vocabulary

Cell Phone Vocabulary

9th - 12th Grade

12 Qs

Understanding Email, Contacts and Calendaring

Understanding Email, Contacts and Calendaring

University

10 Qs

Pra UPS 2

Pra UPS 2

University

20 Qs

BB

BB

University

10 Qs

Arduino

Arduino

7th - 12th Grade

10 Qs

OOP - Java Classes

OOP - Java Classes

Assessment

Quiz

Computers

12th Grade - University

Hard

Created by

I Darmawiguna

Used 397+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which one of the following is a valid statement?

char[] c = new char();

char[] c = new char[5];

char[] c = new char(4);

char[] c = new char[];

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct way of knowing Array Size in Java?

int[] ary;

ary.length()

int[] ary;

ary.length

int[] ary;

ary->length()

int[] ary;

ary->length

3.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

A ___________ is a pre-defined set of steps that complete a specific task, optionally based on parameter values, and optionally returning some result.

array

function

method

module

class

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Predict the output of the following program.


class A{

int a=40;//non static

public static void main(String args[]){

System.out.println(a);

}

}

Compilation Error

40

0

None of the above

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

what is the output of this question?

class Test1 {

public

static void main(String[] args)

{

int x = 20;

System.out.println(x);

}

static

{

int x = 10;

System.out.print(x + " ");

}

}

10 20

20 10

10 10

20 20

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following variable is declared as static?

Home address of a particular Student

Account number of a Customer

Company name of all Employees in an Organization

Name of a Employee

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?

public class Demo

{

public void show(int a)

{

System.out.println(a);

}

public static void main(String[] args)

{

show(20);

}

}

20

No Output Displayed

a constant is passed as argument

Compile Time Error

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?