Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners literals in java program
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


nandu
literals in java program
1 Answer(s)      6 years and 9 months ago
Posted in : Java Beginners


Why we use literals in java program?


Advertisement
View Answers

February 24, 2008 at 8:13 PM


Hello,

A literal is the source code representation of a fixed value; literals are represented directly in your code without requiring computation. As shown below, it's possible to assign a literal to a variable of a primitive type:

boolean result = true;
char capitalC = 'C';
byte b = 100;
short s = 10000;
int i = 100000;

Please check http://www.roseindia.net/java/beginners/Varconstltr.shtml for more code and examples on Java Literals.

Cheers!



Related Tutorials/Questions & Answers:
Literals - Java Beginners
Literals  what is Literals and where we use it. give me example's also thx..   Hi friend, A constant value in a program is denoted by a literal. Literals represent numerical (integer or floating-point
Java Literals
Java Literals      ... as literals in Java programming. When we assign a value to a boolean variable, we can... The string of characters is represented as String literals in Java. In Java
Advertisements
Java Literals
Java Literals      ... as literals in Java programming. When we assign a value to a boolean variable, we can... Literals The string of characters is represented as String literals in Java. In Java
Literals in Jsp
Literals in Jsp          Literals are the values, such as a number or a text string, that are written literally as part of a program code. A literal
Literal in Java
be written directly to java program. Literals is a representation of fixed value...Literal in Java In this section you will learn about literals in Java. "... in the program. Literals are used directly in your source code without any computation
Underscores in Numeric Literals
Underscores in Numeric Literals In this section, you will learn about how you can use underscore in Numeric Literals in Java SE 7. In Java SE 7,  You can place any number of underscore( _ ) between digits of numeric literals
Java Literals
Java Literals      ... as literals in Java programming. When we assign a value to a boolean variable, we can... The string of characters is represented as String literals in Java. In Java
Java - Variable, Constant and Literal in Java
you can use variables, constants and literals in your program easily. Variable... to show the message with java special symbols then you have to use the literals... Java - Variable, Constant and Literal in Java  
java program for
java program for   java program for printing documents,images and cards
Java Program
Java Program  A Java Program that print the data on the printer but buttons not to be printed
a Java program
a Java program    Write a Java program to print even numbers from 2 to 1024? Write a Java program to print ? My Name is Mirza? 100 times? Write a Java program to print Fibonacci Series? Write a Java program to reverse a number
java program
java program  write a program to print 1234 567 89 10
java program
java program  Write a java program to do matrix addition operation On two given matrices
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  how to write an addition program in java without using arithematic operator
java program
java program  Write a java program to find the number of Positive numbers in m* n matrix
java program
java program  Write a program to create an applet and display The message "welcome to java
java program
java program  java program to implement the reflection of a particular class details like constructor,methods and fields with its modifiers
Java Program
Java Program  java program to insert row in excel sheet after identifying an object
java program
java program  write a java program to display array list and calculate the average of given array
java program
java program  write java program for constructor,overriding,overriding,exception handling
java program
java program  hi friends how to make a java program for getting non prime odd numbers in a given series
java program
java program  Write a program to demonstrate the concept of various possible exceptions arising in a Java Program and the ways to handle them.  ... in Java
java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding
java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding
java program
java program  write a program to create text area and display the various mouse handling events
java program
java program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program in java
program in java  write a reverse program in java using string buffer.the input and out put as follows. input- hi good mornig out put-ih doog ginrom
Java program
Java program  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
java program
java program  . Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall
java program
java program  . Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
 

 

 

DMCA.com