We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Java Output Formatting
Java Output Formatting
Sort by
recency
|
1456 Discussions
|
Please Login in order to post a comment
It really highlights how formatting can control the presentation of output—especially useful in console-based applications. 11xplay
lol guys this is what i did import java.util.Scanner;
public class Solution { static void f1(String s){ // String s = "cpp 65"; String[] parts = s.split(" "); String str = parts[0]; String num = parts[1]; String fin = ""; if (num.length()==2){ fin = "0" + num; } else if (num.length()==1){ fin = "00" + num; } else { fin = num; } int space = 15-str.length(); String gap = ""; for(int i=0;i
Java is such a powerful and versatile programming language! Its platform independence and strong object-oriented features make it a go-to choice for building everything from desktop applications to enterprise systems and Android apps. 11xplay
As far as I know Java 7 does not receive free public updates anymore. That means the version's relevance is minimal, if not null. Hackerrank should definitely check on this.
import java.util.Scanner;
public class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in);
}