Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
AllStar
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.Scanner; class Rextester { private static String allStar (String str) { return str.length () > 1 ? str.substring (0, 1).concat ("*").concat ( allStar (str.substring (1)) ) : str; } public static void main(String args[]) { Scanner scan = new Scanner (System.in); String [] arr = new String [5]; int i = 0; try { while ( (arr[i] = scan.nextLine ()) != "" ) System.out.println (allStar (arr [i++])); } catch (Exception e) { System.out.println ("\nno more found!"); } } }
run
|
edit
|
history
|
help
0
// Java Coding Challenge - 09: Find out duplicate numbers using HashSet
Java # Faktöriyel
Frequency
How many Squares in Rectangle
h
bikeride
쓰레드 critical section
final method
Display Page (Pagination)
메소드구현하기-해결