Category: Java

Java Code Snippets and Programs

1

Bankers Algorithm in Java

This is the Implementation of Bankers Algorithm in java The Banker’s algorithm is a resource allocation and deadlock avoidance algorithm developed by Edsger Dijkstra that tests for safety by simulating the allocation of predetermined...

0

Java Program to Find Next Prime

This is the Java program to find the next prime NextPrime[n] gives the next prime above n [cc lang=”java”] import java.io.*; class nxtprm { public static void main(String[] args) { int n=0,j,flag=0,i=0; System.out.println(“Enter the...

0

String Reversal in Java using TCP

This is the java program to perform string reversal using TCP.the client sends the string,the server reverses the string and sent back to the client Java Client Client.java [cc lang=”java”] import java.io.*; import java.net.*;...

0

RMI Implementation in Java

This is the java program to implement RMI in java.the program implemented is a calculator The Java Remote Method Invocation (Java RMI) is a Java API that performs the object-oriented equivalent of remote procedure...

1

CSMA Implementation in Java

This is the CSMA Implementation in java Carrier sense multiple access (CSMA) is a probabilistic media access control (MAC) protocol in which a node verifies the absence of other traffic before transmitting on a...