11, జూన్ 2025, బుధవారం
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:
- It is used in Infix to Postfix or Infix to Prefix conversion.
- It is used in Balancing symbols.
- Forward and Backward feature of the Web browser.
- Undo-Redo feature.
- Used in algorithms like Tower of Hanoi.
- Used in Backtracking
- For String reversal
- 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)
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)
- Asian Paints ltd
- HDFC Bank Ltd
- Pidilite Industries ltd
- SBI
- SRF ltd
- Nestle India ltd
- ITC ltd
- Larsen & Toubro ltd
- Tata Motors ltd
- Bajaj Finance ltd
- Ultratech Cement ltd
- Bajaj Auto
- Apollo Hospitals Enterprise ltd
- Adani Ports ltd
- Interglobe Aviation ltd
- Titan Company
- Avenue Supermarts ltd
- Sun Pharmaceuticals Industries ltd
- M&M ltd
- Reliance Industries ltd
- Bharti Airtel
- DLF ltd