top of page


Join date: May 15, 2022


Markus Welz SpotOnTheMouse V2.7.3 Full Version |LINK|


Markus Welz SpotOnTheMouse v2.7.3 full version

Category:Windows plug-ins Category:Spyware Category:Utilities for WindowsQ: Convert string to int without rounding Hi I have the following code, which I want to take as an input two string values representing years, and output two int values that are the total years and integer years respectively. For example, "2015" and "2" would be equal to 2015 and 2 respectively. Here is my code: String str; int year1; int year2; Scanner sc = new Scanner(; System.out.println("Please enter two years: "); str = sc.nextLine(); switch(str) { case ("2015"): year1 = 2015; year2 = 1; break; case ("2"): year1 = 2; year2 = 1; break; case ("1"): year1 = 1; year2 = 1; break; default: System.out.println("Invalid input."); break; } But I can't help to feel there must be a simpler, more elegant way. Any ideas? A: If you're looking for a way to read multiple int values from a stream, the Scanner can help you here. Using Scanner.nextInt() you can read a single int value from the stream. Example String input = "2015"; Scanner sc = new Scanner(; System.out.println(sc.nextInt(2)); Result 2015 The other way to go about this is using two Scanner objects. Example String input = "2015"; Scanner sc1 = new Scanner(input); System.out.println(sc1.nextInt()); Scanner sc2 = new Scanner(; int year = sc2.nextInt();

Utorrent Markus Welz Spo Full Final X64 Activator Serial Pc


Profile: Members_Page

Markus Welz SpotOnTheMouse V2.7.3 Full Version |LINK|

More actions
bottom of page