Answers for "buscar caracter en string java"

0

de caracter a string en java

//String a Entero
Integer entero = Integer.valueOf(cadena);
// o
int entero = Integer.parseInt(cadena);


//Integer a String
String cadena = Integer.toString(entero);
// o
String cadena = String.valueOf(entero);


//Char a String
String cadena = Character.toString(char);


//String a Char 
char caracter = cadena.charAt(0); //Solo primer caracter


//String a Double
double doble = Double.parseDouble(cadena);


//Double a String
String cadena = String.valueOf(doble);


//String a Float

float flotante = Float.parseFloat(cadena);


//Float a String

String cadena = Float.toString(flotante);


//String a Boolean

Boolean boolean = Boolean.valueOf(cadena);
// o
boolean boolean = Boolean.parseBoolean(cadena);


//Boolean a String

String cadena = String.valueOf(b);
// o
String cadena = Boolean.toString(b);
Posted by: Guest on November-08-2020

Code answers related to "buscar caracter en string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language