Java 4C123  2

Java 4C123 2

Professional Development

35 Qs

quiz-placeholder

Similar activities

Dev Web - Banco de Dados

Dev Web - Banco de Dados

Professional Development

39 Qs

Pemrograman Dasar Kelas X TKJ

Pemrograman Dasar Kelas X TKJ

KG - Professional Development

40 Qs

ROUND 1 TECCASINO

ROUND 1 TECCASINO

KG - Professional Development

33 Qs

Network+

Network+

Professional Development

32 Qs

315 Base de Datos - Parcial 2

315 Base de Datos - Parcial 2

Professional Development

33 Qs

Applications of DMS in A.I AND GATE/JNTUH/NPTEL/PLACEMENTS probl

Applications of DMS in A.I AND GATE/JNTUH/NPTEL/PLACEMENTS probl

Professional Development

40 Qs

TCS NQT 2025 Mock Test 2

TCS NQT 2025 Mock Test 2

Professional Development

36 Qs

Intro to Python 1

Intro to Python 1

9th Grade - Professional Development

30 Qs

Java 4C123  2

Java 4C123 2

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Sandeep Tayal

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

what is the output of this question?

class Test1 {

static int x = 10;

public

static void main(String[] args)

{

Test1 t1 = new Test1();

Test1 t2 = new Test1();

t1.x = 20;

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

System.out.println(t2.x);

}

}

10 10

20 20

10 20

20 10

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the output of this question?

class Test1 {

static int i = 1;

public static void main(String[] args)

{

for (int i = 1; i < 10; i++) {

i = i + 2;

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

}

}

}

3 6 9

3 6 9 …. 27

Error

none

3.

MULTIPLE CHOICE QUESTION

45 sec • 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

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

predict the output

Static block

nothing prints

compile time error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

515

1020

20

30

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

static block can call non static methods with the help of object.

true

false

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

The different between static and non static method is ....

for non static method : user need to create object in a class to call a method.

A method is to perform only specific task.

There is no significant differences between static and non - static method.

Both are bounded with a class.

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?