A
Here, you will find a collection of MCQ questions on Java. Go through these questions to enhance your preparation for upcoming examinations and interviews.
To check the correct answer, simply click the View Answer button provided for each question.
Have your own questions to contribute? Click the button below to share your MCQs with others!
+ Add QuestionA
A
Package com.mypackage;
Public class Solution{
Private int res = 100;
}
A
A
A
String str = “abcde”; System.out.println(str.substring(1, 3));
A
String str = “Hellow”; System.out.println(str.indexOf(‘t));
A
Public class Test{
Public static void main(String argos[]){
String str1 = “one”;
String str2 = “two”;
System.out.println(str1.concat(str2));
}
}
A
String str1 = “chandrakant”.replace(‘c’,’s’);
A
A
If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.
Share Your MCQ