CSE Computer Application - Class X - 2011 PYQ
☰Fullscreen
Table of Content:
Table of Content:
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.
Write an expression in Java for:z = (5x^3 + 2y)/(x + y)
search
which receives a sentence sentnc
and a word wrd
and returns 1 or 0.
(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?
Write the output of the following:
(i) System.out.println(Character.isUpperCase('R'));
(ii) 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
class.a[4]
of char
data type and p[4]
of float
data type.
/
and %
operator?