3:53 pm - Sunday March 25, 2840

Integer Example Program for toOctalString(int i)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
*@author :candidjava.com
*@descriptions : Assign the value in declared integer variable this integer value passing the toOctalString method.This method convert given the integer value to octal values.
*/
public class ToOctalStringEx {
	public static void main(String args[])
	{
		int a=2100;
		String b=new String();
      b=Integer.toOctalString(a);//Normal integer convert for the octalstring
		System.out.println("Octal values:"+b);

	}
}

Output:
<D:Candidjavalanginteger>javac ToOctalStringEx.java
<D:Candidjavalanginteger>java ToOctalStringEx
Octal values:4064

BACK

Filed in: Z-A All Java Codes

Comments are closed.