whats wrong with this program?
whats wrong with this program?
/**Ex25.java
* Ex25-To accept a three-digit number
* and display the digit each on a single line,
* and the sum of these digits.
*@author
*@version Oct.14.2010
*/
import java.awt.*;
import java.util.Scanner;
public class Ex25
{
private String hundredDigit,tenDigit,digit;
private int hd,td,d;
private double n;
private double sum,s;
public Ex25()
{
hundredDigit=getHundredDigit();
tenDigit=getTenDigit();
digit=getDigit();
hd();
td();
d();
sum();
}
public int getHundreDigit()
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter the hundredDigit:");
hundredDigit=sc.nextLine();
hd=Integer.parseInt(hundredDigit);
return hd;
}
public int getTenDigit()
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter the tenDigit:");
tenDigit=sc.nextLine();
td=Integer.parseInt( tenDigit);
return td;
}
public int getDigit()
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter the digit:");
digit=stdin.readLine();
d=Integer.parseInt(digit);
return d;
}
public void hundredigit()
{
hd=n/100;
System.out.println("The hundredDigit is:");
}
public void TenDigit()
{
td=((tn1*10)+(sn*1))/10;
System.out.println("The tensDigit is:");
}
public void Digit()
{
d=(n/100)%10;
System.out.println("The digit is:");
}
public void sum()
{
s=hd+td+d;
System.out.println("The hundredDigit is "+hd+"the tenDigit is "+td+"the digit is "+d+"The sum is:");
}
public static void main(String[]args)
{
Ex25 ex25=new Ex25();
}
}
/**Ex25.java* Ex25-To accept a three-digit number * and display the digit each on a single line,* and the sum of these digits.*@author *@version Oct.14.2010*/import java.awt.*;import java.util.Scanner...