Name the keyword that:
(i) Informs that an error has occurred in an input/output operation.(ii) Distinguishes between instance variables and class variables.
Write a statement each to perform the following tasks on a string:
(i) Find and display the position of the last space in a string s.(ii) Convert a number stored in a string variable x to double data type.
s
x
Write an expression in Java for:z = (5x^3 + 2y)/(x + y)
z = (5x^3 + 2y)/(x + y)
search
sentnc
wrd
(i)
int k = 5, j = 9; k += k - j + k; System.out.println("k = " + k); System.out.println("j = " + j);
(ii)
double b = -15 * 6; double a = Math.rint(Math.abs(b)); System.out.println("a = " + a);
int p = 200; while(true) { if(p < 100) break; p = p - 20; } System.out.println(p);
What is the role of the keyword void in declaring functions?
void
Write the output of the following:(i) System.out.println(Character.isUpperCase('R'));(ii) System.out.println(Character.toUpperCase('j'));
System.out.println(Character.isUpperCase('R'));
System.out.println(Character.toUpperCase('j'));
String n = "Computer Knowledge."; String m = "Computer Applications"; System.out.println(n.substring(0, 8).concat(m.substring(9))); System.out.println(n.endsWith("e"));
Scanner
a[4]
char
p[4]
float
/
%