Question 16 ):- print Char and Boolean value on Console.
class que
{
public static void main(String args[])
{
char c='A';
boolean f=true;
System.out.println("Character value :" + c);
System.out.println("Boolean value :" + f);
}
}
Question 17 ):- Explicit conversion of values.
class que
{
public static void main(String args[])
{
int a=(int)28;
float b=(float)23.7;
double c=(double)234.56;
System.out.println("Integer Value :" + a);
System.out.println("Float Value :" + b);
System.out.println("Double Value :" + c);
}
}
Question 18 ):- Program to check if two variables have same value .
class que
0 Comments