Answer Posted / asit purohit
int num=5672;
int sum=0;
while(num%10!=0)
{
sum=sum+num%10;
num=num/10;
}
System.out.println("sum="+sum);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What's the base class in java from which all classes are derived?
What are implicit objects in java?
Can you make a constructor final?
Give a brief description of java socket programming?
In a program, initializing an array of 100 KB is throwing an out of memory exception while there is 100 MB of memory available. Why?
What is the epoch date?
What are the restrictions imposed on method overriding?
What is an interface in java? Explain
How will you add panel to a frame?
Explain features of interfaces in java?
How to use Media tracker Class.
Explain throw keyword in java?
What is the static keyword?
Where is java located?
Explain about java sdk?