Write a Java program that reads on file name from the user then displays information about whether the file exists,whether the file is readable,whether the file is writable,the type of the file and the length of the file in bytes
Write a Java program that reads a line of integers and displays each integer and sum of all integers using String Tokenizer class
System.out.println(“Enter the first matrix:”);
Scanner input=new Scanner(System.in);
for(int i=0;i<3;i++)
for(int j=0;j<3;j++)
a[i][j]=input.nextInt();
for(int j=i+1;j
if(names[i].compareTo(names[j])<0)
{
temp=names[i];
names[i]=names[j];
names[j]=temp;
}
}
StringBuffer s1=new StringBuffer(args[0]);
StringBuffer s2=new StringBuffer(s1);
s1.reverse();
System.out.println(“Given String is:”+s2);
System.out.println(“Reverse String is”+s1);
Write a Java program that prompts the user for an integer and then prints out all prime numbers up to that integer.
Write a Java program that uses both recursive and non-recursive functions to print nth value in the Fibonacci sequence.
Write a Java program that prints all real solutions to the quadratic equation ax2+bx+c=0. Read in a,b,c and use the quadratic formula.If the discriminant b2-4ac is negative, display a message stating that there are no real roots.
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Submit #Terms of Use
Copyright©2011 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com | Powered by Dhyeya