Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java
« Previous
Next »
How many numeric data types are supported in Java?
Options
- 8
- 4
- 2
- 6
CORRECT ANSWER : 6
Discussion Board
byte,int,short,long,float,double
09666297706
veera reddy 02-20-2019 04:11 AM
data type
answer should be 8 u have missed char and boolean
nishant 07-17-2018 11:29 PM
more
how about char and bool/boolean?
daniel 03-6-2016 11:27 PM
Numeric types
There are six numeric data types four integer and two floating point:
byte 1 byte -128 to -127
short 2 bytes -32,768 to 32,767
int 4 bytes -2,147,483,648 to 2,147,483,647
long 8 bytes -9,223,372,036,854,775,808 to 9,223,372,036,854,775,80
float 4 bytes 7 decimal digits
double 8 bytes 16 decimal digits
These are also called as primitive data types and the most common primitive data type in computer language is number. The number can be used with everything from variable to classes and methods. It can be available in different formats. The following form is used to declare a variable:
type variable = initial value;
where the initial value is optional.
For example:
int myInteger=100;
or
int myInteger;
Rohit Sharma 07-30-2014 09:17 AM
numeric data types in java
byte, int short, long, float, double
Sumalatha 08-20-2013 05:03 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
▲