Explain all java primitive data types, JAVA Programming

Assignment Help:

Explain all Java Primitive Data Types?

boolean

1-bit. May take on the values true and false only.
true and false are describe constants of the language and are not the similar as True and False, TRUE and FALSE, zero and nonzero, 1 and 0 or any another numeric value. Booleans might not be cast into any other category of variable nor may any other variable be cast within a boolean.

byte

1 signed byte (two's complement). Covers values from -128 to 127.

short

2 bytes, signed (two's complement), -32,768 to 32,767

int

4 bytes, signed (two's complement). -2,147,483,648 to 2,147,483,647. Like all numeric kinds ints may be cast into other numeric types (byte, short, long, float, double). While lossy casts are done (e.g. int to byte) the conversion is completed modulo the length of the smaller kind.

long

8 bytes signed (two's complement). Ranges from -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807.

float

4 bytes, IEEE 754. Covers a range from 1.40129846432481707e-45 to 3.40282346638528860e+38 (positive or negative).
Such as all numeric kinds floats may be cast into other numeric types (byte, short, long, int, double). When lossy casts to integer types are done (e.g. float to short) the fractional part is truncated and the conversion is completed modulo the length of the smaller kind.

double

8 bytes IEEE 754. Covers a range from 4.94065645841246544e-324d to 1.79769313486231570e+308d (positive or negative).

char

2 bytes, unsigned, Unicode, 0 to 65,535
Chars are not the similar as ints, bytes, shorts or Strings.


Related Discussions:- Explain all java primitive data types

Moving test, After refactor the main class to become abstract class, I want...

After refactor the main class to become abstract class, I want to move test method from tset clas of main class to subclass, how to do that?

What are the benefits of spring framework, The benefits of Spring are as fo...

The benefits of Spring are as follows: ? Spring has layered architecture. Use what you require and leave you don't require now. ? Spring Enables POJO Programming. There is no

Develop a school java project, Develop a School java project Project Des...

Develop a School java project Project Description: Programming java, threads. Not so hard but requires knowledgeSkills required: Java

List the java class library, list The Java Class Library? Java holds an...

list The Java Class Library? Java holds an extensive library of pre-written classes you can use in your programs. These classes are separated into groups known as packages. Th

Need mahjong puzzle game, Need Mahjong puzzle game I want someone to mak...

Need Mahjong puzzle game I want someone to make this game ( Mahjong puzzle game) for me in Android ONLY. If you have high level programming knowledge in Android then please b

Batch file, how to create batch files of java program

how to create batch files of java program

Define the considerations for servlet clustering? , The clustering regulate...

The clustering regulates high scalability and availability. The basic considerations for servlet clustering are: 1. Objects opened in a session could be serializable to support

A session facade? , Too many function invocations between the server and th...

Too many function invocations between the server and the client will lead to network overhead, tight coupling due to dependencies between the server and the client, misuse of serve

Convert string to super ascii, A string S is said to be "Super ASCII", if i...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''a''''-''''z'''') and

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd