09/01/2025 -------------- Q)Write a Java program that stores 2 accounts' data(accno,name,balance) into computer memory and displays their details. //AccountApplication.java class Account{ int accno; String name; float balance;//instance variables void storeAccountData(){ accno=100001; name="Rama"; balance=770000; }//instance method void displayAccountData(){ System.out.println("ACCNO:"+accno); System.out.println("NAME:"+name); System.out.println("BALANCE:"+balance); } }//Account data type created class AccountApplication{ public static void main(String args[]){ Account acc1=new Account();//Account class is instantiated acc1.storeAccountData(); /* main method is calling storeAccountData() method on the first account object using the reference acc1. */ System.out.println("First account details.........."); acc1.displayAccountData(); /* main method is calling displayAccountData() method on the first account object using the reference acc1. */ Account acc2=new Account(); acc2.storeAccountData(); /* main method is calling storeAccountData() method on the second account object using the reference acc2. */ System.out.println("Second account details.........."); acc2.displayAccountData(); /* main method is calling displayAccountData() method on the second account object using the reference acc2. */ } } Q)What happens in the background when the following statement is executed? Account acc1=new Account(); =>JVM does the following things in order. 1) It loads Account class(class file) into RAM. 2)It creates the object 3)JVM gives default values to the instance variables of the object. Primitive types ---------------- int 0 long 0 byte 0 short 0 float 0.0 double 0.0 boolean false char null character \u0000 For rereference variables --------------------------- null 4)JVM calls a specialized method called constructor on the object 5)IT binds the object to the reference variable.