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

Swing, can we develop paint user can draw his charcters and images in swing...

can we develop paint user can draw his charcters and images in swing

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

Program on while and until loop, Question Based on the program fragmen...

Question Based on the program fragment below, rewrite the outer for loop using: a. while loop b. repeat..until loop

Combo box and Check box help, Sal?s Pizza wants to install a system to reco...

Sal?s Pizza wants to install a system to record orders for pizza and Buffalo chicken wings. When regular customers call Sal?s Pizza on the phone, they are asked their phone number.

Create a wall posting class, Your FaceBooklet application will use the clas...

Your FaceBooklet application will use the classes you wrote for Program 3. Start by creating a copy of your Program 3 project with a new name (say, "Program4"). Note that you ca

Demonstrate a minimal server and client program, This exercise will give yo...

This exercise will give you some introductory exposure to network programming with sockets. Your task is to demonstrate a minimal server program and client program that can send on

Binary search tree, You will be required to create an ADT for a Binary Sear...

You will be required to create an ADT for a Binary Search Tree (BSTInterface.java). The interface will be implemented as a Binary Search Tree (BST) using a reference based format.

I need a dcs source code and jar, I need a DCS (Source code and JAR) to pro...

I need a DCS (Source code and JAR) to process packets from a cheap chinese GPS TK110, the unit is already communicating with the server but is not parsing. So I need someone with e

What is asynchronous messaging, What is asynchronous messaging? Queue An...

What is asynchronous messaging? Queue Ans) Asynchronous messaging includes a client that does not wait for a message from the server. An event is used to trigger a message from

Method over ridding method in java, Q. Write short on the method over riddi...

Q. Write short on the method over ridding method in java? Ans. Method over ridding and dynamic binding: We have seen that a method in a super class is inherited by its subclass

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