Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java
« Previous
Next »
All the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character) in java
Options
- are private
- are serializable
- are immutatable
- are final
CORRECT ANSWER : are final
Discussion Board
java
ll. all the wrapper classes (Integer, Boolean, Float, Short, Long, Double and Character) in java
Options
- are private
- are serializable
- are immutatable
- are final
all wrapper class are immutable also .........
Basanta kumar hota 09-17-2015 02:22 PM
All of the wrapper classes implement Serializable
The wrapper classes are all final AND implement Serializable. So the correct answer is b & d
Dwight Lillie 04-13-2015 05:09 PM
Wrapper class
Wrapper classes provide the way to wrap the data in a new object which contains the value of the variable. Then the object can be used just with any other object like a normal method. These are final as the value is defined already and the object, method or variable is being called wherever it is required without initializing it again. For example:
PI: Suppose we need the value of it in 10 programs correct to ten decimal places, writing them again and again is a very tiresome process but initializing the variable name pi in the beginning of the program and use variable wherever is required will save time.
double pi = 3.1428571428;
double volume = pi * radius * radius * height;
To remove the cases where the pi value can be overrided by some other value we use final variables. If value of variable initializes once can't be changed later on during the execution of the program. It can be described as:
final double pi = 3.1428571428;
So, the same way int, float, short, long, etc. also have a pre-defined value that can't be changed in any manner.
Rohit Sharma 07-30-2014 03:23 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲