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

Difference between inheritance and polymorphism, Question 1: a) What is...

Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

Write a cgi program, Write a CGI program in R, accessible through the class...

Write a CGI program in R, accessible through the class web server, that performs an analysis or creates a graph. You can provide a separate HTML page that displays the initial form

Explain testing objects for equality in java, Explain Testing Objects for E...

Explain Testing Objects for Equality in java? , = can only be used with numbers and characters. They cannot be used with Strings, booleans, arrays or other compound types sin

Javascript validation, Javascript validation, JAVA Programming 1. Obtaining...

Javascript validation, JAVA Programming 1. Obtaining the new script: Download and save the attached comment CGI mailer script form-mail2.pl to your server''s cgi-bin directory, and

Object-based programming, JavaScript is an extremely powerful object-based ...

JavaScript is an extremely powerful object-based (or prototype-based) language. It is not a full-blown OOP (Object-Oriented Programming) language, like Java, however it is an objec

Develop student furniture finder, Project Description: We are looking to...

Project Description: We are looking to prepare an app which allows the user (a student or an expat in a new country) to select from a list of furniture items to prepare a packag

Need graphic designer and developer, My name is Myers, the project director...

My name is Myers, the project director of an online business that is scheduled to commence this summer in Nigeria. We are in the process of recruiting members to the project team a

Thread, create thread without extending anything

create thread without extending anything

Create an embedded javascript function, Given the following XHTML page: ...

Given the following XHTML page:   Create an embedded JavaScript function named getUserInfo that prompts the user with the following two questions after the XHTML page has loa

Different points where weaving can be applied, What are the different point...

What are the different points where weaving can be applied? Ans) There are three points ? Compile Time ? Classload Time ? Runtime

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