Home / Programming Questions / Page 1

Prgramming MCQs Feed | Page - 1

Bookmark
Report
M
Mayank ·
Hard Worker · 239 points
Bookmark
Report

Code:
String s1 = “Hello”;
System.out.println(sA)toLowerCase());
(A) hello
(B) Hello
(C) HELLO
(D) Error
Bookmark
Report
M
Mayank ·
Hard Worker · 239 points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = “Hello”;
System.out.println(s1 == s2);
(A) True
(B) False
(C) Error
(D) None of these
Bookmark
Report
M
Mayank ·
Hard Worker · 239 points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = new String(“Hello”);
System.out.println(s1 == s2);
(A) True
(B) False
(C) Error
(D) None of these
Bookmark
Report
M
Mayank ·
Hard Worker · 239 points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = new String(“Hello”);
System.out.println(sA)equals(s2));
(A) True
(B) False
(C) Error
(D) None of these
Bookmark
Report
M
Mayank ·
Hard Worker · 239 points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = “hello”;
System.out.println(sA)equalsIgnoreCase(s2));
(A) true
(B) false
(C) Error
(D) None of the above
Bookmark
Report
K
Kirti ·
Tutor II · 10.04K points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = “World”;
System.out.println(sA)concat(s2));
(A) HelloWorld
(B) Hello World
(C) Error
(D) None of the above
Bookmark
Report
K
Kirti ·
Tutor II · 10.04K points
Bookmark
Report

Code:
String s1 = “Hello”;
String s2 = “World”;
System.out.println(s1 + s2);
(A) HelloWorld
(B) Hello World
(C) Error
(D) None of the above
Bookmark
Report
K
Kirti ·
Tutor II · 10.04K points
Bookmark
Report

Code:
String s1 = “Hello”;
int i = 2;
System.out.println(sA)charAt(i));
(A) l
(B) e
(C) Error
(D) None of the above

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.