Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class test {
- public static void main(String[] args) {
- char myChar = 'l';
- int i = (int) myChar; // cast from a char to an int
- System.out.println ("ASCII value - " + i);
- String finalString = "";
- int round = 5;
- while (round > 0){
- finalString += i;
- round--;
- }
- System.out.println(finalString);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement