Category: Computer Network

Computer Network program in java

crc cyclic redundancy check program in java

import java.util.Scanner; class CRC { public static void main(String args[]) { Scanner sc = new Scanner(System. in ); int m,g[],n,d[],z[],r[],msb,i,j,k; System.out.print("Enter no. of data bits : "); n = sc.nextInt(); System.out.print("Enter no. of generator...

checksum program in java

checksum program in java

import java.io.*; import java.util.*; class checksum { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("Enter the no of bit in array :"); int n=sc.nextInt(); int arr[]=new int[n]; System.out.println("Enter bits in array: ");...

Client Server program in java

Client Server program in java

TCPClient.java File import java.io.*; import java.net.*; class TCPClient { public static void main(String argv[]) throws Exception { String FromServer; String ToServer; Socket clientSocket = new Socket("localhost", 5000); BufferedReader inFromUser =new BufferedReader(new InputStreamReader(System.in)); PrintWriter outToServer...

Hamming Code program in java

Hamming Code program in java

Hamming Code program : import java.io. * ; import java.util. * ; class Hamming { public static void main(String args[]) throws IOException { Scanner sc = new Scanner(System. in ); int m, h[], n,...