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
Due to impedance mismatch between relational technology and object you need to understand the progress of mapping classes (objects) and their relationships to tables and relationsh

search a file with specific extension

Struts components can be classify into Model, View and Controller: ? Model: Components like business logic /business processes and data are the type of model. ? View: HTML, J

How to Scaling Images in java applet? You can scale an image within a particular rectangle using this version of the drawImage() method: public boolean drawImage(Image img,

Maintenance and Administration activities: Name                        : e-Commerce OS and Soft wares    : Websphere 6.0, IHS, Unix, Weblogic 8.1   Maintenance an


Need to develop a Fantasy football Project Description: I am seeking to build a Fantasy football website. i already have an example of existing website. i want the exact same

Describe Member Variables vs. Local Variables ? class Car { String licensePlate = ""; // member variable double speed; = 0.0; // member variable double maxSp

Question: a) Change the following example, using the Java's conditional operator expression, to solve the duplication problem. public class Demonstrate { public static voi

According to XMPP Standards Foundation "XMPP is the Extensible Messaging and Presence Protocol, a set of open technologies for instant messaging, presence, multi-party chat, voice