Explain primitive data types in java, JAVA Programming

Assignment Help:

Explain primitive data types in java?

Java's primitive data types are extremely similar to those of C. They involve boolean, byte, short, long, int, float, double, and char. The boolean type has been added. Therefore the implementation of the data types has been substantially cleaned up in various ways.

1. Where C and C++ go away a number of issues to be machine and compiler dependent (for instance the size of an int) Java specifies everything.
2. Java prevents casting among arbitrary variables. Only casts among numeric variables and among sub and superclasses of the same object are permitted.
3. All numeric variables in Java are signed.

sizeof isn't essential in Java because all sizes are precisely described. For instance, an int is always 4 bytes. This might not seem to be adequate while dealing with objects in which aren't base data types. Therefore even if you did know the size of a particular object, you couldn't do anything with it anyway. You cannot convert an arbitrary object within bytes and back again.


Related Discussions:- Explain primitive data types in java

What is the point-to-point model in jms, A point-to-point model is based on...

A point-to-point model is based on the concept of a message queue: Senders send messages into the queue, and the receiver reads messages from this queue. In the point-to-point mode

How to prepare trial balnce reports, i m working on an accounting software ...

i m working on an accounting software and need the java code for preparing trial balance report

Relate in brief - microsoft vs java, Relate in brief - Microsoft vs Java ...

Relate in brief - Microsoft vs Java Microsoft hates Java, as a Java program (portable) isn't tied to any particular operating system. If Java is popular, then programs written

Explain what is fontmetrics in java, Explain what is FontMetrics in Java? ...

Explain what is FontMetrics in Java? No word wrapping is completed when you draw a string in an applet, even if you embed newlines in the string along with \n. If you expect th

PadovanString, write a program that counts the number of occurrences of the...

write a program that counts the number of occurrences of the string in the n-th Padovan string P(n).   program in java // aakash , suraj , prem sasi kumar kamaraj college

What is the difference between internet and intranet, What is the differenc...

What is the difference between Internet and Intranet ? Intranet and internet are 2 domains which are extremely a like but frequent segregated in order to manage security. Inter

How instant messaging works explain their process, How instant messaging wo...

How instant messaging works? Write the steps involved in this process? The Instant Messaging services available permit us to manage a list of people (contacts) that we interact

Implement decision tree algorithm using netbeans, Implement Decision Tree A...

Implement Decision Tree Algorithm using Netbeans (Java) & Microsoft Access 2007. "One Level is enough, output should contains gain of each attribute, the selected attribute and

Android app for username and password, Hi, I have an android sdk assignment...

Hi, I have an android sdk assignment which is due monday night. The user will enter the following information. url address www.google.com user name [email protected] password 12

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