Core Java/Java 8 Assessment

A visually engaging illustration related to Core Java concepts, featuring elements like code snippets, and Java-related symbols, with a modern and techy design.

Core Java/Java 8 Assessment

Test your knowledge of Core Java and Java 8 with this comprehensive 30-question quiz. Whether you are a beginner or an experienced developer, this quiz is designed to challenge your understanding and application of Java programming concepts.

Key Features:

  • 30 Multiple-Choice Questions
  • Covers Collections Framework, Exception Handling, and Java 8 Features
  • Instant Feedback on Your Answers
30 Questions8 MinutesCreated by CodingExplorer121
Which of these is not an interface in the Collections Framework?
Collection
Group
Set
List
Which interface restricts duplicate elements?
Set
List
Map
All of these
A HashMap allows the existence of:
A) null values
B) one null key
D) None of the above
C) All of the above
Which does NOT implement the Collection interface?
List
Map
Set
None of these
Which provides better performance for the insertion and removal from the middle of the list?
Vector
ArrayList
LinkedList
All of these
After resizing, size of ArrayList is increased by :
200%
50%
100%
None of these
HashSet internally uses?
Set
HashMap
List
Collection
Which of these is synchronized?
TreeMap
HashMap
Hashtable
All
Java does not support _________________?
Inheritance
Multiple inheritance for classes
Multiple inheritance of interfaces
Compile time polymorphism
Encapsulation concept in java is
Hiding complexity
Method hiding
Hiding constructor
None
Runtime polymorphism feature in java is
Method Overriding
Method Overloading
Constructor Overloading
Operator Overloading
For Cat and Animal class, correct way of inheritance in java is
Class Cat extends Animal
Class Animal extends Cat
Both are correct way
None is correct way
If I want to have common functions in a class and want to defer implementations of some other functions to derived classes, then we need to use
An Interface
An Abstract Class
A Static Class
None
Loose coupling in java programs can be done by
Using Interface
Encapsulating an object of another class
Both
None
Which keyword is used to refer current object of a class in Java?
This
New
Current
Self
None
False statement about static method in java
Belongs to class not object of the class
Can be called without any object creation of a class
Can access non static and static variables both.
All are correct
Which of these keywords is not a part of exception handling?
Finally
Thrown
Catch
Try
Throws
Which of these is a super class of all errors and exceptions in the Java language?
Catchable
Throwable
RunTimeException
None of these
Which exception is thrown when divide by zero statement executes?
NumberFormatException
NullPointerException
ArithmeticException
None of these
What exception thrown by parseInt() method?
ArithmeticException
ClassNotFoundException
NullPointerException
NumberFormatException
Which is not a primitive data type?
Boolean
Character
Arrays
Integer
What is the default value of boolean?
True
False
'1'
'0'
Given the code:
 

String s1 = ” yes” ;

String s2 = ” yes ” ;

String s3 = new String ( s1);

 

Which of the following would equate to true?

S1 == s2
S1 = s2
S3 == s1
S3 = s1
S1 !=s2
What is garbage collection in the context of Java?
The operating system periodically deletes all of the java files available on the system
Any package imported in a program and not used is automatically deleted.
When all references to an object are gone, the memory used by the object is automatically reclaimed
The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
When all references to an object are gone the memory used by the object is not reclaimed.
Lambda expressions in java 8 are based on
Procedural programming
Functional programming
Data programming
All
In Java 8 Interfaces, methods can be:
Default
Abstract
All
None
Stream operations in java 8 can be divided into
Terminal types
Intermediate types
All
None
In java 8 Function is ?
Class
Interface
Lambda Expression
Object
What can help us in avoiding NullPointeExceptions and null checks in java 8
Optional
Required
NotNull
NotRequired
Functional interfaces method is
Static
Abstract
Final
None
{"name":"Core Java\/Java 8 Assessment", "url":"https://www.supersurvey.com/QPREVIEW","txt":"Test your knowledge of Core Java and Java 8 with this comprehensive 30-question quiz. Whether you are a beginner or an experienced developer, this quiz is designed to challenge your understanding and application of Java programming concepts.Key Features:30 Multiple-Choice QuestionsCovers Collections Framework, Exception Handling, and Java 8 FeaturesInstant Feedback on Your Answers","img":"https:/images/course8.png"}
Powered by: Quiz Maker