Java applet program for interest rate calculation

Java applet program output for interest rate calculation Sunday, October 4th, 2009  »  Posted By  »  Total 1 Comment

Write a Java program that computes the payment of a loan based on the amount of the loan, the interest rate and the number of months. It takes one parameter from the browser: Monthly rate;if true, the interest rate is per month; Otherwise the interest rate is annual.

Java applet program that displays a simple message

Java Applet program output Sunday, October 4th, 2009  »  Posted By  »  Total 1 Comment

public void init()
{
msg+=”init()—>”;
setBackground(Color.orange);
}

Java program that converts infix expression into postfix form

Sunday, October 4th, 2009  »  Posted By  »  Total 2 Comments

Enter input string
a+b*c
Input String:a+b*c
Output String:
abc*+

Java program that implements stack ADT

Friday, October 2nd, 2009  »  Posted By  »  Total 1 Comment

public stack(int s)
{
size=s>0?s:10;
top=-1;
elements=(E[])new Object[size];
}

Java program that displays the number of characters, lines and words in a text file

Friday, October 2nd, 2009  »  Posted By  »  Total 1 Comment

while((c=isr.read())!=-1)
{
chars++;
if(c==’\n’)
lines++;
if(c==’\t’ || c==’ ‘ || c==’\n’)
++words;
if(chars!=0)
++chars;
}

Java program to read and display files

Friday, October 2nd, 2009  »  Posted By  »  Total 1 Comment

Wtire a Java program that reads a file and displays the file on the screen, with a line number before each line.

Java program to display the information’s of the file

Friday, October 2nd, 2009  »  Posted By  »  Total 2 Comments

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

Java program using String Tokenizer class

Friday, October 2nd, 2009  »  Posted By  »  Total 0 Comment

Write a Java program that reads a line of integers and displays each integer and sum of all integers using String Tokenizer class

Java Program to multiply two matrices

Friday, October 2nd, 2009  »  Posted By  »  Total 5 Comments

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();

Java program to sort a given list of names in ascending order

Friday, October 2nd, 2009  »  Posted By  »  Total 2 Comments

for(int j=i+1;j {
if(names[i].compareTo(names[j])<0)
{
temp=names[i];
names[i]=names[j];
names[j]=temp;
}
}

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup