Advertisements
Advertisements
Question
Write the output of the following program code:
char ch ;
int x=97;
do
{
ch=(char) x;
System.out.print(ch + “ ” );
if(x%10 == 0)
break;
++x;
}while(x<=100);
One Word/Term Answer
Solution
output: a b c d
shaalaa.com
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
What is a parameterized constructor?
Name the two types of constructors.
Consider the following program segment and answer the questions below:
class calculate
{
int a;double b;
calculate()
{
a=0;
b=0.0;
}
calculate(int x, double y)
{
a=x;
b=y;
}
void sum()
{
System.out.println(a*b);
}}
Name the type of constructors used in the above program segment.