class FloatConversion
{
public static void main(String args[])
{
int i = 44;
float f = 98.42f;
double d = 103.67;
f = i;
d = f;
i = (int) d;
System.out.println("i = " + i);
System.out.println("f = " + f);
System.out.println("d = " + d);
}
}
A. |
i = 44 f = 44.0 d = 44.0 |
B. |
i = 103.67 f = 44 d = 98.42 |
C. |
i = 44 f = 44 d = 44 |
D. |
i = 44.0 f = 44.0 d = 44.0 |
Input (char[][], String) | Output (Boolean) |
---|---|
B A T C |
true |
B A T C |
true |
Q E A |
false |
Q E A D R |
true |
Q E A D R |
true |
Q E A |
true |
Q E N |
true |
Q E A D M |
true |
Q E A D N |
true |
class FindWordPresentInCharacterMatrixBiDirectional
{ public static void main(String s[])
{
char[][] input = {{'A', 'S', 'C', 'D'}, {'C', 'T', 'A', 'F'}, {'Q', 'M', 'A', 'S'}, {'V', 'X', 'Z', 'C'}};
System.out.println("CAT is present : " + isWordIsPresentInMatrix(input, "CAT"));
}
public static boolean isWordIsPresentInMatrix(char[][] matrix, String searchWord) {
//Write code here to find if the word is present in the given matrix.
}
//Write code here if we want create any new methods.
}