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
Spring - JSF integration is useful when an event handler wishes to explicitly invoke the bean factory to make beans on demand, such as a bean that encapsulates the business logic t

What is Invoking static methods If a method or field is declared static, you access it through using the class name rather than a reference to a particular example of the class

Use of WebLogic Platform in Project: Technologies Tools: Weblogic 8.1, Solaris 9, MQ Series 6.0, iplanet 6.1, Mercury Test Director. Project Overview: Wellington Manag

I am requiring webcam software integrated into my site I have website and I am wanting webcam software integrated into my site the company I have found doesn't offer support in

What happens to the static fields of a class during serialization? There are three exceptions in which serialization does not necessarily read and write to the stream. These

Defiine the term Object ? Object is a named collection of properties (data, state) & techniques (instructions, behavior). Mainly Objects are key to understanding object-oriente

.Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the

An application server cluster has of a number of application servers loosely coupled on a network. The server group or server cluster is usually distributed over a number of nodes

Explain multi dimentional arrays in java? So far all these arrays have been one-dimensional. That is, a single number could locate any value in the array. Therefore sometimes d

QUESTION 3: Overloaded methods Write the overloaded method named average () for each of the following problems: a) The first method receives THREE (3) integer values and returns