ICSE Computer Application - Class X - 2012 PYQ
☰Fullscreen
Table of Content:
Table of Content:
Name the type of error (syntax, runtime or logical error) in each case given below:
Create a class with one integer instance variable. Initialize the variable using:
Scanner sc = ____ Scanner(__________);
Name the search or sort algorithm that:
int a = 63, b = 36; boolean x = (a > b)? true : false; int y = (a < b)? a : b;
char c = 'A'; int n = c + 1; char ch = (char)n;
int x = 4; x += (x++) + (++x) + x;
double x = 2.9, y = 2.5; System.out.println(Math.min(Math.floor(x), y)); System.out.println(Math.max(Math.ceil(x), y));
String s = "Examination"; int n = s.length(); System.out.println(s.startsWith(s.substring(5, n))); System.out.println(s.charAt(2) == s.charAt(6));
State the method that:
String s1 = "Computer", s2 = "Applications" a = (s1.compareTo(s2)); b = (s1.equals(s2));
String s = "malayalam"; System.out.println(s.indexOf('m')); System.out.println(s.lastIndexOf('m'));
int f = 1, i; for(i = 1; i <= 5; i++){ f *= i; System.out.println(f); }
In the program given below, state the name and the value of the:
class MyClass{ static int x = 7; int y = 2; public static void main(String args[]){ MyClass obj = new MyClass(); System.out.println(x); obj.sampleMethod(5); int a = 6; System.out.println(a); } void sampleMethod(int n){ System.out.println(n); System.out.println(y); } }