This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Integer data type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Integer data type" Watch "Integer data type" New topic

Integer data type

jaysingh solanki

Joined: Nov 11, 2003
Posts: 14
public class Lit{
public static void main(String[] argv){
int i = 18;
int j = 022;//Octal version: Two eights plus two
int k = 0x12;//Hex version: One sixteen plus two
long f=1.2L;
My Question:How i assign long value to f
if i put 1.2L or 1.2l it give
error Invalid character in number.
dennis zined
Ranch Hand

Joined: Mar 07, 2003
Posts: 330
long f=(long)1.2;

SCJP 1.4<br />SCWCD 1.4
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Integer data type
jQuery in Action, 3rd edition