+ 2
Can someone explain me this weird looking code??🤔🤔🤔
I can't understand this,"System.out.printf("%-15s%03d%n", s1, x);"piece of code! Scanner sc=new Scanner(System.in); System.out.println("================================"); for(int i=0;i<3;i++) { String s1=sc.next(); int x=sc.nextInt(); System.out.printf("%-15s%03d%n", s1, x); } System.out.println("================================");
3 Antworten
+ 1
thanks but I want to know about this line
System.out.printf("%-15s%03d%n", s1, x);
0
it will print ==, then run a loop 3 times. each time it will take 2 input. one string and one int. then it will print that string and integer. and then again print ===
0
expresiones regulares?