2017 universities Ranking in Pakistan

Here are overall top universities of Pakistan.Some universities are at the top place in engineering fields but others are at Applied science, BA and in IT programs

Wednesday, 20 February 2019

Use of Objects in Java (Basic Program)

The below program we created three files named as Client, Student, and Marker. We declare the main method in Client class. The objective of this program is to show you the use of objects in java. For Compilation Javac -d . Client.java  is used. And for execution Java Client is used. Student.java package Student; public class Student { public int age; public String name; public int id; } Marker.java package Marker; public class...

Wednesday, 6 February 2019

Three Dimension Array in Java (Simple program)

import java.util.Scanner; public class ThreeDArray { public static void main(String []args) { Scanner s=new Scanner(System.in); System.out.println("Enter number of Pages:"); int p=s.nextInt(); System.out.println("Enter number of rows:"); int r=s.nextInt(); System.out.println("Enter number of colums:"); int c=s.nextInt(); int arr[][][]=new int[p][r][c]; System.out.println("Enter numbers in Three dimentional Array:"); ...

Two Dimension Arrays in Java (Simple program)

import java.util.Scanner; public class TwoDArray { public static void main(String []args) { Scanner s=new Scanner(System.in); System.out.println("Enter number of rows:"); int a=s.nextInt(); System.out.println("Enter number of colums:"); int b=s.nextInt(); int arr[][]=new int[a][b]; System.out.println("Enter numbers in Two dimentional Array:"); for(int j=0;j<arr.length;j++) for(int i=0;i<arr.length;i++) { arr[i][j]=s.nextInt(); ...

One Dimention Arrays in JAVA Simple Program

import java.util.Scanner; public class SingleArray { public static void main(String []args) { Scanner s=new Scanner(System.in); System.out.println("Enter size of an array:"); int x=s.nextInt(); int arr[]=new int[x]; System.out.println("Enter Numbers in an array:"); for(int i=0;i<arr.length;i++) { arr[i]=s.nextInt(); } for(int i=0;i<arr.length;i++) { System.out.println(arr[i]); } } } ...