From 264b21d6011b01f3aba37efabb43e546fa051c93 Mon Sep 17 00:00:00 2001 From: Saurabh Bhardwaj <53724086+sbhardwaj8717@users.noreply.github.com> Date: Sat, 3 Oct 2020 20:36:40 +0530 Subject: [PATCH] Update Project.java I have removed all the errors from the main() function. --- Project.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.java b/Project.java index 9a2bc7d..0b429b6 100755 --- a/Project.java +++ b/Project.java @@ -342,7 +342,7 @@ static void bill(int rn,int rtype) System.out.println("==============="); System.out.println("Item Quantity Price"); System.out.println("-------------------------"); - for(Food obb:hotel_hotel_ob.deluxe_singleerrom[rn].food) + for(Food obb:hotel_ob.deluxe_singleerrom[rn].food) { amount+=obb.price; String format = "%-10s%-10s%-10s%n"; @@ -486,8 +486,8 @@ class write implements Runnable public void run() { try{ FileOutputStream fout=new FileOutputStream("backup"); - objectOutputStream oos=new ObjectOutputStream(fout); - oos.writeObject(ob); + ObjectOutputStream oos=new ObjectOutputStream(fout); + oos.writeObject(hotel_ob); } catch(Exception e) { @@ -508,7 +508,7 @@ public static void main(String[] args){ { FileInputStream fin=new FileInputStream(f); ObjectInputStream ois=new ObjectInputStream(fin); - Hotel.ob=(holder)ois.readObject(); + Hotel.hotel_ob=(holder)ois.readObject(); } Scanner sc = new Scanner(System.in); int ch,ch2;