Java Programming Questions & Answers: part5



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part5 : 1 to 5

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

1.Basic Java language functions are stored in which of the following java package?

java.lang
java.io
java.net
java.util
java.awt.

2.A package is a collection of

Classes
Interfaces
Editing tools
Classes and interfaces
Editing tools and interfaces.

3.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.

4.The wrapping up of data and functions into a single unit is called

Encapsulation
Abstraction
Data Hiding
Polymorphism
Message passing.

5.A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction?

Declare the method with the keyword public
Declare the method with the keyword private
Declare the method with the keyword protected
Do not declare the method with any accessibility modifiers
Declare the method with the keyword public and private.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Trust because you are willing to accept the risk, not because it’s safe or certain