Guest User

Untitled

a guest
Jun 18th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class TestClass {
  5. String inputString = "Bla";
  6. int inputInteger = 0;
  7.  
  8. public void startProgram(){
  9. System.out.println("Gib eine Zahl ein:");
  10. Scanner sc = new Scanner(System.in);
  11. inputString = sc.next();
  12. inputInteger = Integer.parseInt(inputString);
  13. }
  14.  
  15. public static void main(String[] args){
  16. TestClass testClass = new TestClass();
  17. testClass.startProgram();
  18. }
  19. }
Add Comment
Please, Sign In to add comment