Consider the following statements:
1. Java is portable and can run on any hardware/operating-system platform.
2. Java is developed by Sun Microsystems.
3. Programs written in Java are faster and require less memory than those written in C and C++.
4. Java is derived much of its syntax from C and C++.
Which of the statements given above is/are correct about Java language?
A. 1,2,3 and 4
B. 1, 2 and 3
C. 1, 2 and 4
D. 2,3 and 4

VerifiedVerified
119.7k+ views
Hint: Java is an object-oriented language designed keeping in mind to reduce the number of implementation dependencies to the minimum possible number. It was developed by James Gosling under the umbrella of Sun Microsystem which was later acquired by Oracle.

Complete Answer:
In1995, Java was developed to create an object-oriented, simple, and dynamic language. Java is general-purpose programming which gives the application developers an advantage of writing the code once anywhere and running it on any platform. This makes java very easy to use and it is portable and can run on any hardware/operating-system platform.
Java was designed to be architecture-neutral and portable. Along with these features like being robust, secure, and executed with high performance were also kept in mind while designing the language.
Java has derived much of its syntax from C and C++ and has removed the complicated features of the language.
This is object-oriented which has a few basic features like object, class, inheritance, polymorphism, abstraction, encapsulation. Java has no explicit pointer and it runs inside a virtual machine sandbox. It also checks fragments of different codes to identify illegal codes and an inbuilt system to determine what resources a class can access like reading and writing on the local disk.

Thus, option (C) is correct.

Note: Java is an interpreter based language and takes a longer time to execute than any compiled language like C or C++. Java is still faster than many other traditional languages because the language is very similar to native code.