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
Which models are supported by JMS? Please, explain them. Ans) Publish or subscribe (pub/sub). This model permits a client (publisher) to send messages to a JMS topic. These mess

Struts is a set of cooperating classes, servlets, and JSP tags that make up a reusable MVC 2 design. ? JavaBeans components for managing application state and behavior. ? Eve

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. Date & Tim

Project Description: A web developer is required to finish a webcam site with basic account management and voting functionality. The website can make use of a third party fla

RMI transport layer usually opens direct sockets to the server. Several Intranets have firewalls that do not accept this. To get through the firewall an RMI call may be embedded wi

1) Categorical variable tread Pattern = {A, B} and numerical variable tread Depth are used to classify Handling = {good, poor} of a vehicle. Depth is normally distributed with mean

I need Java coding Need to develop a website. Require Java coder's urgently. Skills required: HTML, Graphic Design, Java, PHP, Website Design

public class TreeTest {     public static void main(String args[])     {         Tree t = new Tree ();         System.out.println("Populating");         t.insertItem(1);         t

Need to develop a 3D rolling alarm clock (Android) Project Description: I want an android app as 3D rolling alarm clock It should have sound effect when setting the alarm

How do I write a program a bout Rotor cipher?