class IntegerConversion
{
public static void main(String args[])
{
long l = 787878;
int i = 656565;
short s = 3333;
byte b = 111;
l = i;
i = s;
s = b;
System.out.println("l = " + l);
System.out.println("i = " + i);
System.out.println("s = " + s);
System.out.println("b = " + b);
}
}
A. |
l = 656565 i = 3333 s = 111 b = 111 |
B. |
l = 787878 i = 656565 s = 3333 b = 111 |
C. |
l = 111 i = 111 s = 111 b = 111 |
D. | Program does not compile. |
Input (Character array) | Output (Character array) |
---|---|
['S', 'A', 'C', 'H', 'I', 'N'] | S*CHIN -> A |
['G', 'A', 'N', 'G', 'U', 'L', 'Y'] | ['A', 'U', 'N', 'G', 'G', 'L'] |
['L', 'A', 'X', 'M', 'A', 'N'] | ['A', 'A', 'M', 'L', 'N'] |
['D', 'R', 'A', 'V', 'I', 'D'] | ['R', 'I', 'V', 'D', 'D'] |
class FindStrokeOutLettersOrder
{ public static void main(String s[])
{
char input[] = {'Y', 'U', 'V', 'R', 'A', 'J'};
System.out.print("The strike out order is : ");
for (char ch : getStrikeOutOrder(input)) {
System.out.print(ch + " ");
}
}
public static char[] getStrikeOutOrder(char[] input) {
//Write a code here to get the order of the stroke out letters.
}
}