Strings & Arrays

Strings & Arrays

University

12 Qs

quiz-placeholder

Similar activities

OCA Chuong 3

OCA Chuong 3

University

15 Qs

MD2-1.3- Câu lệnh điều kiện

MD2-1.3- Câu lệnh điều kiện

University

10 Qs

OCA Chuong 2

OCA Chuong 2

University

11 Qs

Practice test 14

Practice test 14

5th Grade - University

15 Qs

Ukulele

Ukulele

3rd Grade - University

15 Qs

Hmh Inside Out and Back Again

Hmh Inside Out and Back Again

8th Grade - University

15 Qs

De todo

De todo

1st Grade - Professional Development

16 Qs

Strings & Arrays

Strings & Arrays

Assessment

Quiz

English

University

Hard

Created by

Abdul Rahman

Used 2+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int a[]={1,2,3};

int b[]=a;

a[0]+=1;

a[1]+=1;

System.out.println(b[0]+b[1]+b[2]);

8

6

123

233

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String a='mango';

String b='MANGO';

System.out.println(a.equals(b));

error

true

false

nothinng will be printed

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String a="mango";

String b="MANGO";

System.out.println(a==b);

true

false

error

Nothing will be printed

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String a=new String("APPLE");

String b=new String("APPLE");

System.out.println(a==b);

true

false

error

Nothing will be printed

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

int a[]=new int[3];

a[0]=1;

a[1]=2;

System.out.println(a[0]+a[1]+a[2]);

3

123

out of bound error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

System.out.println(1+2+""+3+4);

334

1234

10

37

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String a="12";

for(int i=0;i<a.length();i++){

a+='1';

}

System.out.println(a);

121

12

infinite loop

31

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?