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
Is string is a data type?
If a class is declared without any access modifiers, where can the class be accessed?
What is a container in a gui?
What is jit compiler in java?
Under what conditions is an object’s finalize() method invoked by the garbage collector?
What exactly is java?
Can java hashmap have duplicate keys?
How do you join strings in java?
Can we define a package statement after the import statement in java?
Can a constructor be protected?
What is the basic of java?
Is ruby built on java?
What are JVM.JRE, J2EE, JNI?
Can we force garbage collector to run ?
Explain the difference between association, aggregation and inheritance relationships.