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

Design a game in java, The game of Kala is played on a rectangular board: ...

The game of Kala is played on a rectangular board: In front of each player are six pits numbered 1 to 6 (called the 'side pits'). To the right of a player's side pits is a

Registered objects in a rmiregistry, How to get all the registered objects ...

How to get all the registered objects in a rmiregistry? Ans) Using list method of Naming Class.

Posting on a wall, Viewing a User's Wall Where your project allows you t...

Viewing a User's Wall Where your project allows you to view a user's profile, your ZHTML must provide the following capabilities: 1. Provide a Wall for that user profile, dis

What are the advantages of multimedia presentations, What are the advantage...

What are the advantages of multimedia presentations? Write any five. Multimedia presentation is a excellent tool for effective communication: Advantages: 1. Easy to make l

Difference between durable and non-durable subscriptions, Point-To-Point (P...

Point-To-Point (PTP). This model permits exchanging messages via queues formed for some purposes. A client can send and receive messages from one or various queues. PTP model is ea

Data structures programming, Colossus has just purchased a computer for it...

Colossus has just purchased a computer for its new automated reservation system. You have been asked to program the new system.  You are to write a program to assign seats on ea

Why we avoiding short circuits, Why we Avoiding Short Circuits ? If you...

Why we Avoiding Short Circuits ? If you need all of your boolean expressions evaluated regardless of the truth value of each, then you can use & and | instead of && and ||. The

Exception handling in EJB, Java has two kinds of exceptions: 1. Checked ...

Java has two kinds of exceptions: 1. Checked exception: handled from java.lang.Exception but not java.lang.RuntimeException. 2. Unchecked exception: handled from java.lang.Ru

Explain the methods of java.lang.object, Explain The Methods of java.lang.O...

Explain The Methods of java.lang.Object? java.lang.Object gives a number of methods that are general to all objects. toString() is the most general such method. Because the def

Tasks with the classes Currency, In this assignment you work on a set of ta...

In this assignment you work on a set of tasks with the classes Currency, Money and Bank. Money and Currency You have been given a template for the Currency and Money classes (Lab1.

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