package demopackage; public class mainClass { public static void main(String[] args) { Scanner myScanner = new Scanner(System.in); String myInput = myScanner.nextLine(); if (Integer.valueOf(myInput) < 5) { System.out.println("Less than 5 since myInput is : " + myInput); } else if (Integer.valueOf(myInput) < 10) { System.out.println("Less than 10 since myInput is : " + myInput); } else { System.out.println("Not less than 5 or 10 since myInput is : " + myInput); } System.out.println("NEXT LINE"); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter