Thursday, March 10, 2011

Pokemon New Emerald Free File- Shiny Pokemons

Conversion of integers, strings, double

Some examples of conversions of integers, strings, double in Java:

public class
ConvertiIntInString {
public static void main ( String [] args ) {
Int int a = 1 ;
UnaString String = Integer.toString (a Int ) ;
}}


public class ConvertiStringInInt {
public static void hand ( String [] args ) {
String = unaString "3478" ;
int unInt = Integer.parseInt (unaString ) ;
System.out.println ( unInt) ;
}
}

public class ConvertDoubleInString {
public static void main ( String [] args ) {
double unDouble= 0.12 ;
String unaString = Double.toString ( unDouble) ;
}
}

public class ConvertiStringInDouble {
public static void main ( String [] args ) {
String unaString = "4545" ;
double un Double = Double.parseDouble ( unaString) ;
System.out.println ( unDouble ) ;
}
}

0 comments:

Post a Comment