OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

quiz-placeholder

Similar activities

Python MCQ

Python MCQ

University

20 Qs

Introducción a las bases de datos

Introducción a las bases de datos

12th Grade

20 Qs

WML & WAP

WML & WAP

University

20 Qs

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Hyrje në SO

Hyrje në SO

University

10 Qs

Application Development Midterm Quiz

Application Development Midterm Quiz

University

15 Qs

Arduino Loop

Arduino Loop

2nd Grade - University

20 Qs

Planning and Implementation of Information Security

Planning and Implementation of Information Security

University

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?