NEW ****Numerical Ability**** NEW



Showing posts with label JAVA Programming. Show all posts
Showing posts with label JAVA Programming. Show all posts

JAVA Interview Questions1

Q1. How could Java classes direct program messages to the system console, but error messages, say to a file?

A. The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:
Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st); System.setOut(st);

*Q2. What's the difference between an interface and an abstract class?

A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.


more.....!!!


Read more


Language Fundamentals on JAVA


1. 
Which four options describe the correct default values for array elements of the types indicated?
1.    int -> 0
2.    String -> "null"
3.    Dog -> null
4.    char -> '\u0000'
5.    float -> 0.0f
6.    boolean -> true
A.
1, 2, 3, 4
B.
1, 3, 4, 5
2, 4, 5, 6
D.
3, 4, 5, 6

2. Which one of these lists contains only Java programming language keywords?
A.
class, if, void, long, Int, continue
B.
goto, instanceof, native, finally, default, throws
C.
try, virtual, throw, final, volatile, transient
D.
strictfp, constant, super, implements, do
E.
byte, break, assert, switch, include
more with explanation answers.....

Read more

Popular Posts

online materials. Powered by Blogger.

This Blog to Your Language

English French German Spain Italian Dutch Russian Portuguese Japanese Korean Arabic Chinese Simplified

Labels

Arithmetic (8) C Programming (3) current Affairs (3) General Awarens (5) JAVA Programming (2) Reasoning (5) videos (1)

Total Pageviews

Calender

Followers