Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

char cannot be converted to string

//As the compiler said, you can't convert a char to a String. 
//If you have a char and you really want to convert it to a String of length 1, 
//this will work:

String s = String.valueOf(c);
//Or
String s = Character.toString(c);
Comment

PREVIOUS NEXT
Code Example
Java :: reverse sentence in java 
Java :: java.lang.Long cannot be cast to java.lang.Integer 
Java :: Private properties in JavaScript ES6 classes 
Java :: kotlin enable and disable parents view children 
Java :: android videoview setup 
Java :: sprint jpa properties for application.yml 
Java :: navigate from one fragment to another android 
Java :: isnumber java 
Java :: java number 
Java :: setint java 
Java :: counting sort java 
Java :: loop through a 2d array java 
Java :: how to truncate decimals in java 
Java :: how to print array 
Java :: java get input 
Java :: android studio list of strings 
Java :: java reverse loop 
Java :: capitalize each word in string java 
Java :: android change checkbox color 
Java :: java prime numbers 
Java :: java create arraylist 
Java :: indexoutofboundsexception java 
Java :: java loop hashmap 
Java :: android toast message 
Java :: how to iterate a queue in java 
Java :: how to create a stack data structure in java? 
Java :: action bar message spigot 1.8 
Java :: how to send get request in java 
Java :: why are there no destructors in java? 
Java :: factorial program in java 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =