Skip to content

Commit

Permalink
Deleting a casting example
Browse files Browse the repository at this point in the history
  • Loading branch information
NiiSV811 committed Oct 12, 2022
1 parent 85a41aa commit 78439bc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions Java Essentials/src/essentials/basic/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,5 @@ public static void main(String[] args) {
//Console output
System.out.println("Hi " + nameInput);

//If you want to store a number, you can cast

String booksNumber;
String calculusGrade;

booksNumber = JOptionPane.showInputDialog("How many books you have?");
calculusGrade = JOptionPane.showInputDialog("What is your calculus grade?");

int numberOfBooks = Integer.parseInt(booksNumber);
double gradeOfCalculus = Double.parseDouble(calculusGrade);

//Now you can operate your inputs




}
}

0 comments on commit 78439bc

Please sign in to comment.