SJF Scheduling Program in C

Here you will get the shortest job first scheduling program in c with an example. In the shortest job first scheduling algorithm, the processor selects the waiting process with the smallest execution time to execute next. Example: Let’s take one example to understand how SFJ works. Process Burst Time P1 4 P2 2 P3 3 …

SJF Scheduling Program in C Read More »

Polymorphism in Java

Polymorphism is used to assume the ability of several different forms. Or we can say performing one task in different ways. In java + operator is used for addition as well to concatenate (join) strings. Here a single operator is doing two different things depending upon the type of argument, so it is the situation …

Polymorphism in Java Read More »

Java Program to Find IP Address

In this program we will find ip address by using InetAddress class present in java.net package. Method getLocalHost() prints the ip of your local machine while method getByName() prints the ip of a particular url. Also Read: Java Program to Find Union of two Arrays Program:- import java.net.*; class FindIP { public static void main(String…s)throws Exception …

Java Program to Find IP Address Read More »

Java Program for Multiplication of two Matrices

import java.util.Scanner; //import Scanner class in our program class demo { public static void main(String…s) { int i,j,m,n,p,q,k; Scanner sc=new Scanner(System.in); //used to read from keyboard System.out.print(“Enter number of rows and columns of first matrix:”); m=sc.nextInt(); n=sc.nextInt(); System.out.print(“Enter number of rows and columns of second matrix:”); p=sc.nextInt(); q=sc.nextInt(); if(n!=p) System.out.print(“nSorry multiplication can’t be done!!”); else …

Java Program for Multiplication of two Matrices Read More »