Академический Документы
Профессиональный Документы
Культура Документы
com/
BLOG ARCHIVE
▼ 2010 (5)
▼ September (1)
Interview Questions
in Java
1 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
2 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
Q:What is final?
A:A final class can't be extended ie., final class may not
be subclassed. A final method can't be overridden when
its class is inherited. You can't change value of a final
variable (is a constant).
Q:How can one prove that the array is not null but
empty using one line of code?
A:Print args.length. It will print 0. That means it is empty.
But if it would have been null then it would have thrown
a NullPointerException on attempting to print
args.length.
3 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
Q:What is Overriding?
A:When a class defines a method using the same name,
return type, and arguments as a method in its
superclass, the method in the class overrides the
method in the superclass.
When the method is invoked for an object of the class,
it is the new definition of the method that is called, and
not the method definition from superclass. Methods may
be overridden to be more public, not more private.
4 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
0 comments
Practical Assignment - 2
Posted by Parag Shukla at 10:06 PM
5 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
6 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
0 comments
Assignment - 1
Posted by Parag Shukla at 9:39 PM
7 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
8 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
if (x<=0) return 0;
else return 1+f(x-1);
}
9 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
D. 9 27 18 15 10 13 12 12
E. None of these
A.
0
0
0
B.
0 0 0
0 0 0
C.
0 0 0
D.
0 0
0 0
0 0
E. None of These
10 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
c). Double
d). byte
e). DataInputStream
0 comments
Labels: AITS, Assignment-1, Java, MCA 3 JAVA
Practical Assignment - 1
Posted by Parag Shukla at 1:28 AM
11 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
* * * * * *
* * * *
* *
1 234512345
1 234 2345
1 23 345
1 2 45 *
1 5 * * *
1 2 45 *
1 23 345
1 234 2345 (Input : 3)
1 234512345
A) Input : PARAG
Output :
P
P A
P A R
P A R A
P A R A G
B) Input : PARAG
P
A A
R R
A A
G G
A A
R R
A A
P
0 comments
12 of 13 9/24/2010 2:28 PM
Fundamental of Java Programming http://630002.blogspot.com/
13 of 13 9/24/2010 2:28 PM