Java program to casting input values.


Posted by Dr. jha
Link-->To his blog.



import java.io.*;
class Demoinput
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter 2 Number");
String n1 = br.readLine();
String n2 = br.readLine();

System.out.println("Enter two numbre again");
int y = Integer.parseInt(br.readLine());
int x = Integer.parseInt(br.readLine());
System.out.println("Result="+(n1+n2));
System.out.println("Example of integer casting");
System.out.println("Result="+(x+y));
}
}

Binary search program.



Posted by Dr. jha
Link-->To his blog.



class Search{

public static void main(String args[]){
int a[]={40,50,20,47,28,16,60,8,70};

Bindu B = new Bindu();

B.B_search(a,70);
B.bubble(a);
for(int i=0;i
System.out.println("soretd array"+a[i]);
}

}
}
class Bindu{


void B_search(int ar[],int key){

System.out.println(ar.length + ":" + key);
int low=0,high=ar.length,mid=0;

while(low<=high){

mid=(low+high)/2;
if(ar[mid]==key){
System.out.println("required no is"+ar[mid]);
break;
}
else
{
if(ar[mid] low=mid+1;
else
high=mid-1;
}

}

}




void bubble(int ar1[]){
int i=0,j=0;
for(i=(ar1.length-1);i>0;i--){
for(j=0;j if(ar1[i]>ar1[i+1]){
int temp=ar1[i];
ar1[i]=ar1[i+1];
ar1[i+1]=temp;
}
}
}
}

}



/*void Rec_search(int a[],int high,int low,int key){

int mid=high+low;
if(a[mid]==key)
return a[mid];
else{
if(a[mid] low=mid+1;
else
high=mid+1;
}





}*/

Bubble sorting and then searching.


Posted by Dr. jha
Link-->To his blog.



class Search{

public static void main(String args[]){
int a[]={40,50,20,47,28,16,60,8,70};

Bindu B = new Bindu();

B.B_search(a,70);
B.bubble(a);
for(int i=0;i
System.out.println("soretd array"+a[i]);
}

}
}
class Bindu{


void B_search(int ar[],int key){

System.out.println(ar.length + ":" + key);
int low=0,high=ar.length,mid=0;

while(low<=high){

mid=(low+high)/2;
if(ar[mid]==key){
System.out.println("required no is"+ar[mid]);
break;
}
else
{
if(ar[mid] low=mid+1;
else
high=mid-1;
}

}

}




void bubble(int ar1[]){
int i=0,j=0;
for(i=(ar1.length-1);i>0;i--){
for(j=0;j if(ar1[i]>ar1[i+1]){
int temp=ar1[i];
ar1[i]=ar1[i+1];
ar1[i+1]=temp;
}
}
}
}

}



/*void Rec_search(int a[],int high,int low,int key){

int mid=high+low;
if(a[mid]==key)
return a[mid];
else{
if(a[mid] low=mid+1;
else
high=mid+1;
}





}*/

Package program of java.



Posted by Dr. jha
Link-->To his blog.




package j1;
public class Mathh{
int x=4,y=5;

public void sum(){
int sum=x+y;
System.out.println("sum="+sum);
}

public void mul(){
int mul=x*y;
System.out.println("mul="+mul);
}
}

2010 M.sc tech(IMCA) third year papers.

M.sc tech(IMCA) third year title of papers. in 2010

Data mining and data warehousing----->Mr. S.K Naqvi(Center foe information technology member)

Analysis of algorithms and design---->Mr. A.Kamal.(D/O mathematics)

Mathematical modelinng and simulation.-->Mr A.Q Ansari(D/O eletronics.)

Financial mathematics.--->Alim Beg(D/o economics.)


Java and internet programming.---->Mr. A.Kamal.(D/O mathematics)