+ 2
How can I write a code in java that gets human inputs (using String datatype) and converts it to an uppercase or lowercase?
Getting inputs and converting it to uppercase or lowercase or both simultaneously..
5 Antworten
+ 11
What language?
+ 8
In Java:
import java.util.Scanner;
public class Program
{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String s = scan.next().toUpperCase();
System.out.println(s);
}
}
You can use toLowerCase() instead of toUpperCase().
+ 2
https://code.sololearn.com/cqSmN9lgyBS5/?ref=app
I guess you mean c++....
+ 1
Java lang...
+ 1
Thanks Jafca...
It worked