Take Core Java Online Test and evaluate your readiness before you appear for any interview or written test. Consisting of objective type questions from various important concepts of Core Java, this test presents you questions followed by four options. The correct answer, explanation and example provided with each question make it easier for you to understand each concept well.
Who is this Core Java Online Test designed for?
All the Developers, Programmers, Front End developers, UI/ UX developers and designers will find this test extremely useful. All freshers, BCA, BE, BTech, MCA and college students wanting to make a career in IT field will be highly benefited by this test.
Core Java Online Test topics
This online test covers topics like - Object and Classes, Constructors, Datatypes, Variable Types, Modifier Types, Operators, Numbers, Characters, Strings, Arrays, Date and Time, Regular Expressions, Methods, Files and I/O, Exceptions, Inner classes, Inheritance, Overriding, Polymorphism, Abstraction, Encapsulation, Interfaces, Packages, Data Structures, Collections, Generics, Serialization, Networking, Multithreading etc.
1. Which of the following statement is legal?
a. int arr = new int;
b. int arr = new int;
c. int arr = new int;
d. All of them
Answer: a. int arr = new int;
2. What is returned when the method substring(2, 4) is invoked on the string "sample"?
Answer: c. "mp"
3. Which of the following is considered as a structure that defines the data and the methods to work on that data?
Answer: b. Class
4. Which of the following is considered as a specific instance of a class that contains real values instead of variables?
Answer: a. Object
5. Name the collection interface used to represent collections that maintain unique elements.
d. All of above
Answer: c. Set
6. Abstract classes cannot be instantiated, but they can be subclassed
Answer: a. True
7. Char data type is used to store any character and its minimum value is 0
Answer: a. True
8. Which of the following opertor inverts all the bits?
Answer: c. ~
9. What is the value in num?
str = "tutorialride";
num = str.indexOf("tutor");
Answer: d. -1
10. Which of the following interface of Java Collection Framework doesn’t inherit from Collection interface?