Skip to main content

Posts

Showing posts from June, 2013
What will be the output of the following program? class Testing {    public static void main(String ar[])     {        Testing t = new Testing();        t.show(1);     }    void show(byte b) {System.out.println("Byte");}       void show(short s) {System.out.println("Short");}    void show(int i) {System.out.println("Int");}    void show(long l) {System.out.println("Long");}    } (a) What will be the output when we remove the  void show(int i)      {System.out.println("Int");} from the class. (b) What will be the output when we remove last two methods from the class? Explain the output.

What is Java? What is the need of Java and what are its features?

Java is an Object-oriented programming language developed by Sun Microsystems (James Gosling) in 1990. Need of Java: Java is an internet programming language. Security and platform-independence are the two most important requirements for Web applications. Java provides both. Java enables users to develop and deploy applications on the internet for servers, desktops and small hand-held devices. Features of Java: Java is: 1. Simple 2. Object Oriented 3. Secure 4. Platform independent 5. Multi-threaded 6. Robust