6, జూన్ 2025, శుక్రవారం

only code , author holds masters degree in computers in 2001 from Andhra University faculty of Engineering ........later another masters degree in CSE from JNTU HYD campus ...... This is the program for RMI implementation developed by the Ramu senior java&j2EE programmer

 import java.rmi.*;

public interface readinterface extends Remote

{public int read() throwsRemoteException;

}


import java.rmi.*;

import java.rmi.server.*;

import java.io.*;

public class readserver extends UnicastRemoteObject implements readinterface

{

public readserver()throwsRemoteException

{

}

public int read() throws RemoteException

{

DataInputStream k=new DataInputStream(System.in);

try

{

int r=Integer.parseInt(k.readLine());

return r;

}

catch(Exception e)

{System.out.println("the io exception raised in the read function"); }

return 1;

}

public static void main(String agrs[])

{

try

{

readserver r1=new readserver();

Naming.rebind("ramu1",r1);

System.out.println("the ramu1 server started for reading");

}

catch(Exception e)

{

System.out.println("the exception raised in the read server");

}}}

import java.rmi.*;

public interface addinterface extends Remote

{

public int add(int x,int y) throws RemoteException;

public int sub(int x,int y) throws RemoteException;

}

import java.rmi.*;

import java.rmi.server.*;

import java.io.*;

public class addserver  extends UnicastRemoteObject implements addinterface

{

public addserver() throws RemoteException

{}

public int add(int x,int y)  throws RemoteException

{

return x+y;


}

public int sub(int x,int y)  throws RemoteException

{

return x-y;

}

public static void main(String args[])

{

try

{

addserver a=new addserver();

Naming.rebind("ramu2",a);

System.out.println(" the add server ramu2 is also started");

}

catch(Exception e){}

}}


import java.rmi.*;

import java.rmi.server.*;

public class myclint 

{

public static void main(String args[])

{

try

{

readinterface r= (readinterface)Naming.lookup("ramu1");

addinterface a=(addinterface)Naming.lookup("ramu2");

int x=r.read();

System.out.println("this value is obtained from server1"+x);

int y=r.read();

System.out.println("this value is obtained from server1"+y);

int z=a.add(x,y);

System.out.println("\n this result is obtained form the second server"+z);

}

catch(Exception e){}

}}

for creation of batchfile for the above program  run.bat

javac addinterface.java

javac addserver.java

javac readinterface.java

javac readserver.java

start rmiregistry

rmic addserver

rmic readserver

start  java addserver

start  java readserver

java myclint


5, జూన్ 2025, గురువారం

Applications of Stack:, Time Complexity of Stack...................

 

Applications of Stack:

The stack data structure has numerous applications, some of them are as follows:

  1. It is used in Infix to Postfix or Infix to Prefix conversion.
  2. It is used in Balancing symbols.
  3. Forward and Backward feature of the Web browser.
  4. Undo-Redo feature.
  5. Used in algorithms like Tower of Hanoi.
  6. Used in Backtracking
  7. For String reversal
  8. For memory management

Time Complexity of Stack

The Time Complexity of different operations of the stack is as follows:

Push Operation:

  • Best Case: O(1)
  • Average Case: O(1)
  • Worst Case: O(N)where N is the number of items in the stack
  • Space Complexity: O(1)

Pop Operation:

  • Best Case: O(1)
  • Average Case: O(1)
  • Worst Case: O(1)
  • Space Complexity: O(1)

Peek Operation:

  • Best Case: O(1)
  • Average Case: O(1)
  • Worst Case: O(1)
  • Space Complexity: O(1)

isFull operation:

  • Best Case: O(1)
  • Average Case: O(1)
  • Worst Case: O(1)
  • Space Complexity: O(1)

isEmpty operation:

  • Best Case: O(1)
  • Average Case: O(1)
  • Worst Case: O(1)
  • Space Complexity: O(1)

Addis Bole old INTL terminal ........................................

 

4, జూన్ 2025, బుధవారం

IN INDIAN MARKETS PROTECTING CAPITAL is THE MOST IMPORTANT ONE THEN ONLY JOURNEY WILL BEGIN IN THE NSE OR BSE ................................

 Some Suggestions (No Recommendation) 

  1. Asian Paints ltd
  2. HDFC Bank Ltd
  3. Pidilite Industries ltd
  4. SBI
  5. SRF ltd
  6. Nestle India ltd
  7. ITC ltd
  8. Larsen & Toubro ltd
  9. Tata Motors ltd
  10. Bajaj Finance ltd
  11. Ultratech Cement ltd
  12. Bajaj Auto
  13. Apollo Hospitals Enterprise ltd
  14. Adani Ports ltd
  15. Interglobe Aviation ltd
  16. Titan Company
  17. Avenue Supermarts ltd
  18. Sun Pharmaceuticals Industries ltd
  19. M&M ltd
  20. Reliance Industries ltd
  21. Bharti Airtel
  22. DLF ltd

GLIMPSE THE NOTES OF MY CLASSROOM ………………………………Mr.Ram..........Hyderabad.........dual mode

 






Mr.Ram.A.Dayinaboyina .................................