STATIC KEYWORD IN JAVA

STATIC KEYWORD IN JAVA

9th - 12th Grade

18 Qs

quiz-placeholder

Similar activities

Quiz sobre Estructuras Selectivas en Java

Quiz sobre Estructuras Selectivas en Java

12th Grade - University

19 Qs

ความรู้เบื้องต้นการเขียนโปรแกรมภาษาซี

ความรู้เบื้องต้นการเขียนโปรแกรมภาษาซี

12th Grade

20 Qs

C++ kvizić

C++ kvizić

10th Grade

17 Qs

การเขียนโปรแกรม

การเขียนโปรแกรม

10th - 11th Grade

20 Qs

حاسب 1 نظري

حاسب 1 نظري

10th Grade

21 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

PPG 25 Feb 2022

PPG 25 Feb 2022

12th Grade

19 Qs

Practice Quiz for Term 1

Practice Quiz for Term 1

10th Grade

20 Qs

STATIC KEYWORD IN JAVA

STATIC KEYWORD IN JAVA

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Nishat Khimani

Used 91+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

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

2.

MULTIPLE CHOICE QUESTION

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

3.

MULTIPLE CHOICE QUESTION

30 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

30 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

5.

MULTIPLE CHOICE QUESTION

30 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

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this question?

class Test1 {

static int i = 1;

public static void main(String[] args)

{

int i = 1;

for (Test1.i = 1; Test1.i < 10; Test1.i++) {

i = i + 2;

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

}

}

}

1 3 9

1 2 3 … 9

3 5 7 9 11 13 15 17 19

None

7.

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[];

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?