File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 agree. Here's the link:
subject: Integer data type
jQuery in Action, 3rd edition