Program of declaration of variables in java, JAVA Programming

Program of Declaration of variables in Java

Program for declaring variables in Java, I've been trying so many codes for this but those codes didn't work well. Please write the code for declaring variable in java.



Posted Date: 2/11/2013 4:57:08 AM | Location : United States

You can try this example once. It will definitely work.

Program - Concept of Declaration of variables 

 class Variable_Concepts 


       public static void Main () 


          char ch = ''A'';                          // Declaring a Character variable with value = ''A'' 

          byte a = 50;                          // Declaring a byte variable with value = 50 

          int b = 123456789;                // Declaring an Integer variable with value = 123456789 

          long c = 1234567654321;      // Declaring a Long type variable with value = 1234567654321 

         bool d = true;                       // Declaring a Boolean type variable with TRUE value 

         float e = 0.000000345F;        // Declaring a float type variable with value = 0.000000345. 

The value ends with a ''F'' resembeling a float data type

Float  f  =  1.23e5F;  //  Declaring a float  type exponential variable  with value = 1.23E5 = 123000.  The value contains the character ''e'' resembeling  an exponential value.Also,  the value ends  with a ''F'' resembeling a float data  type. 



Posted by Jacob | Posted Date: 2/11/2013 5:01:22 AM

Thank you for this code, it really works well, you are doing great job.


Posted by Archie | Posted Date: 2/11/2013 5:04:51 AM

Related Discussions:- Program of declaration of variables in java, Assignment Help, Ask Question on Program of declaration of variables in java, Get Answer, Expert's Help, Program of declaration of variables in java Discussions

Write discussion on Program of declaration of variables in java
Your posts are moderated
Related Questions
What is the difference between instance and object of a class? Few says both are same, then why java kept both the words for same thing?

Extraction of articles The software I'm looking to build: 1. Extraction of articles from various sites 2. Format the content to re-post 3. Automate the process Skill

What are the Sub categories of Artificial Intelligence? Briefly explain any two. 1. Robotics :  These are the machines that are computer programmed and perform work that was pr

Message is a light weight message having only header and properties and no payload. Therefore if the If the receivers are to be notified about an event, and no data requires to be

Include Photo Upload feature to Android App with Google App Engine Project Description: I have one small Android App skeleton that requires some features added to and backed

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

I just finished a small tutorial on JSP and servlet now I was looking for some assignments so that I can try my hands on

Video course on computer security needed Project Description: We want a video course on computer security. Just like the way lynda provides. Skills required are Computer S

Modify your UserProfile class to meet the following requirements: It must include a field called wall to store an ArrayList of wall posting objects. It must also provide

What is the role of fonts in java explain with example? You've already seen one instance of drawing text in the HelloWorldApplet program of the last chapter. You call the drawS