Need Help ?

Home / Expert Answers / Other / import-java-util-scanner-public-class-main-public-static-void-main-string-args-scanner-s-new-scanner

(Answered): import java.util.Scanner;public class Main {public static void main(String[] args) {Scanner s = new ...




2 import java.util.Scanner; 3 public class Main ! 5 ava 6 7 public static void main(String[] args) { Scanner 3 = new Scanner

port java.util. Inpat. MaamatchException: import java.util.Scan public class Mainoption extends Student Info publie void main

import java.util. Inputhanatchee Previous Bookmark import java.util. Some pabllo Olass StudAdd extend Student Into publle voi

import java.util.Scanner; 4 5 public class StudDelete extends Student Info 6 7 public void StudentDelete 9 9 Student Into al

ages dpaduage import java.util.Scanner publid olan StudOpdate extends Studelete public void Student Update() Student Info 1 =

Stationer Listinto si - . . . . ht. . . . . - as . , in . . . . . . V. V. V. TV rocy. V in Section . . . . . . e tisti

import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner s = new Scanner(System.in);
StudentInfo s1 = new StudentInfo();

s1.display();
}
}

import java.util.InputMismatchException;
import java.util.Scanner;

public class MainOption extends StudentInfo {

public void main()
try {
Scanner s = new Scanner(System.in);
StudentInfo s1 = new StudentInfo();
System.out.println("====================================================================================================");

System.out.println("(1)Viewn (2)Updaten (3)Deleten(4)Addn");
System.out.println("Enter your choice: ");
option = s.nextInt();
do {
switch (option) {
case 1:
System.out.println("n");
System.out.println("====================================================================================================");
s1.StudInfo();
this.main();
System.out.println("====================================================================================================");
break;

case 2:
System.out.println("n");
System.out.println("====================================================================================================");
StudUpdate u1 = new StudUpdate();
s1.StudUpdate();
u1.StudentUpdate();
System.out.println("====================================================================================================");
this.main();
break;

case 3:
System.out.println("n");
System.out.println("====================================================================================================");
StudDelete d1 = new StudDelete();
d1.StudDelete();
s1.StudInfo();
System.out.println("====================================================================================================");
this.main();
break;

case 4:
System.out.println("n");
System.out.println("====================================================================================================");
StudAdd a1 = new StudAdd();
a1.StudAdd();
s1.StudInfo();
System.out.println("====================================================================================================");
this.main();
break;

case 5:
System.out.println("Invaild Input!!");
this.main();
System.out.println("Enter your choice: ");
System.out.println("====================================================================================================");
default;
{

}
while (option != 8);
}
catch (InputMismatchException err){
System.out.println("Invalid Input!!");
  
  
  
}


import java.util.InputMismatchException;
import java.util.Scanner;

public class StudAdd extends StudentInfo {

public void StudentUpdate() {

StudentInfo s1 = new StudentInfo();
Scanner s = new Scanner(System.in);

try {

System.out.println("nEnter the slot you want to update:");
edit = s.nextInt();
System.out.println("n");
lucban = 1;
adds = add - 1;
} catch (Exception error) {
System.out.println("Invalid Input!!");
StudentUpdate();
}
try {
if (Age[adds] != 0 && add > 0) {

}
}
do {
{
System.out.println("Enter First name: ");
slot5 = s.next();
System.out.println("Enter Last Name: ");
slot6 = s.next();
System.out.println("Enter Gender: ");
slot7 = s.next();
System.out.println("Enter Birthday: ");
slot8 = s.next();
System.out.println("Enter Hometown: ");
slot4 = s.next();
System.out.println("Enter Teacher: ");
slot3 = s.next();
System.out.println("Enter Section: ");
slot2 = s.next();
System.out.println("Enter Age: ");
slot1 = s.nextInt();
System.out.println("Enter Grade: ");
slot9 = s.next();

if (slot1 > 1) {
System.out.println("Invalid Input!!");
StudentUpdate();
}
}
if (slot1 > 0);
{
Name[adds] = slot5;
LN[adds] = slot6;
Gender[adds] = slot7;
Birthday[adds] = slot8;
Hometown[adds] = slot4;
Teacher[adds] = slot3;
Section[adds] = slot2;
Age[adds] = slot1;
Grade[adds] = slot9;

System.out.println("Student Information has been UpdatedSuccessfully!!");
lucban++;
}
} while (lucban < 2);

}
  
else{
System.out.println("Try Again!!");
}
catch (Exception oops){
MainOption m = new MainOption();
System.out.println("Invaild Input!!");
m.main();
}
}

im having trouble with this code do to some errors so im hopingi can have some help with it im using java 8 i couldnt copy thecode cuz it said question was too long so i had to do it likethis

2 import java.util.Scanner; 3 public class Main ! 5 ava 6 7 public static void main(String[] args) { Scanner 3 = new Scanner (System.in); Student Info sl = new StudentInfo(); java 9 9 java jav! y jay 10 gl.display(); 12 13 port java.util. Inpat. MaamatchException: import java.util.Scan public class Mainoption extends Student Info publie void main() try Scanner - new Scanne Systein) Student Into si - new student info: System.out.println(" System.out.println"Vivin Opdaten Deloten dala"); System.out.println("Enter your chole"); option - nextInt(): do! witch (option) case 11 System.out.printin("n"); Syatenot.printin- 1.Stontot) : this.main(); System.out.println(" break: 16 17 18 19 "} 23 24 20 Syatem.out.println("n"); System.out.println Stadtpdate vi- new StudUpdate 0 31. StudUpdate() ul. Student Updated) System.out.printin this.main() break; 30 31 30 30 ?? 38 3 case 3: Syatem.out.println("n") System.out.printin- StadDelete di = new StadDelete() dl. StudDelete() 31. Studento): System.out.println(" this.main() break; 1 44 "} Case 1 System.out.println() System.out.printin StudAdd al = new StudAdd() al. StudAdd(): 31. Studento) System.out.println(" this.no break: Cane 51 System.out.println("Invas Input this.main() System.out.printin("Enter your choice!") System.out.println default: while [option 01 66 catch (Inputtinatch Exception ere Syatem.out.println("Invalid Input import java.util. Inputhanatchee Previous Bookmark import java.util. Some pabllo Olass StudAdd extend Student Into publle void Student Updated) Student Into 1 - Student Info Scanners - new Scanner(System.in) System.out.printin("ince the us you want to ditent System.out.printin" Lucban dod - catch eption error System.out.println("Invita input Student Opdate TTY e toetada 16 Ladd > 0) 1 System.out.printitet ") mots-et) System.out.println("Enter Laste" Sote-S.) System.out.printiner" Sot - Synten.co.printiner"> slot.) System.out.println("Enter" slott - System.out.printlnite Teache") to- Hysten.nut.printlnter Section Blot. System.out.printing) sol - System.out.println("Grad) wou) at tatott > 1) System.out.php Studente - 5 dal - SLO Dended 2017 Midayda - Maddal - 1 Tedd)) ensionada - wo import java.util.Scanner; 4 5 public class StudDelete extends Student Info 6 7 public void StudentDelete 9 9 Student Into al - new StudentInfo(): Scanner 3 new Scanner (System.in); System.out.println("Enter the slot you want to delete: "); erasers.nextInt (); eraserheads - eraser-1; 10 11 12 13 24 25 16 17 18 19 20 21 22 I 11(eraser>0. lAge[eraserheads ] ! -0) 1 Name [eraserheads ) - "Empty": LN [eraserheada)- "Empty": Gender[eraserheads) - "Empty": Birthday[eraserheads] - "Empty": Hometown [eraserheads] - "Empty": Section[eraserheads ] - "Empty": Teacher teraserheada) "Empty": Age[eraserheads)- 20: Grade [eraserheads] = "Empty": 24 25 29 20 System.out.println("Student Information has been deleted successfull); elne System.out.println("Try Again"); ages dpaduage import java.util.Scanner publid olan StudOpdate extends Studelete public void Student Update() Student Info 1 = new StudentInfo() Scanner - new Scanner System.in); anon Cladd Sudelete Bud.pdate Studentov Company dages System.out.print set the set out to edit - 3.nextInt ) System.out.print("n") Lucban 12 editit 1: 11 12 14 catch (Exception error) System.out.printlnt Invas Tape Student Opdate 02 . try 1 tage editarosledit) dot si System.out.println("Enter T ) slots System.out.println("Ett ant slottet Syatem.out.printiner") slot7 - the System.out.print") lotet System.out.print" sot - System.out.println("Este te Blo) - System.out.print"33 slot2 - 3.0 Syatem.out.println slot. System.out.prints slott stalot System.out.print) Bandenrelater 1 aristot -OS Test-ce Senda - - IM Stationer Listinto si - . . . . ht. ". . . . - as . , in ' . . . . . . " V. V. V. TV rocy. "V" in Section . . . . . . e tisti Orade - ty. DUTY ette til We watsen Tret PRO 1. mailachen, da, and antite ollanti motor. O water tentu. Samad, Dett w ***** ESTE tot int wit TT- . . . . . . . . H+ + +


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.i...
We have an Answer from Expert

Buy This Answer $4

Place Order