09-02-2012, 03:22 PM
ENGINEERING AND TECHNOLOGY QUESTION PAPER
[attachment=17359]
6) Write the HTML tag which shows details (like abbreviation) of the word when mouse pointer is moved on top of the word.
7) Write the CSS syntax for making the <H4> elements in the document Red in colour and Arial font.
8) Why do we use static keyword along with the main method while writing a Java program?
9) What is the value of the following expression, and why?
10) Consider the following class:
public class IdentifyMyParts {
public static int x = 7;
public int y = 3;
}
a. What are the class variables in the program?
b. What are the instance variables?
11) Write a Java program to compare two string values for equality.
12) Write a CSS code to make the hyperlink change its color during the different stages of the page link in the Html.
13) What is the output of the following Java program:
public class X
{
public static void main(String[] args)
{
int current, prev = 1, prevprev = 0;
for(int i = 0; i < 20; i++)
{
current = prev + prevprev;
System.out.print(current + " ");
prevprev = prev;
prev = current;
}
System.out.println();
}
}
14) Consider the following two classes:
public class ClassA {
public void methodOne(int i) {
}
public void methodTwo(int i) {
}
public static void methodThree(int i) {
}
public static void methodFour(int i) {
}
}
public class ClassB extends ClassA {
public static void methodOne(int i) {
}
public void methodTwo(int i) {
}
public void methodThree(int i) {
}
public static void methodFour(int i) {
}
}
a. Which method overrides a method in the superclass?
b. Which method hides a method in the superclass?
c. What do the other methods do?
15) Consider the following code snippet.
int i = 10;
int n = i++%5;
a. What are the values of i and n after the code is executed?
b. What are the final values of i and n if instead of using the postfix increment operator (i++), you use the prefix version (++i))?