100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Complete Java $8.49   Add to cart

Interview

Complete Java

 2 views  0 purchase
  • Course
  • Institution

it consists all the important questions on java along with the solutions

Preview 4 out of 179  pages

  • October 25, 2023
  • 179
  • 2022/2023
  • Interview
  • Unknown
  • Unknown
  • Secondary school
  • 2
avatar-seller
1) What is Java?
Java is the high-level, object-oriented, robust, secure programming language, platform-independent, high performance,
Multithreaded, and portable programming language. It was developed by James Gosling in June 1991. It can also be known as the
platform as it provides its own JRE and API.



2) What are the differences between C++ and Java?
The differences between C++ and Java are given in the following table.


Comparison Index C++ Java

Platform-independent C++ is platform-dependent. Java is platform-independent.

Mainly used for C++ is mainly used for system Java is mainly used for application programming.
programming. It is widely used in window, web-based,
enterprise and mobile applications.

Design Goal C++ was designed for systems Java was designed and created as an interpreter
and applications programming. It for printing systems but later extended as a
was an extension of C support network computing. It was designed with
programming language. a goal of being easy to use and accessible to a
broader audience.

,Goto C++ supports Java doesn't support the goto statement.
the goto statement.

Multiple inheritance C++ supports multiple Java doesn't support multiple inheritance through
inheritance. class. It can be achieved by interfaces in java.

Operator Overloading C++ supports operator Java doesn't support operator overloading.
overloading.

Pointers C++ supports pointers. You can Java supports pointer internally. However, you
write pointer program in C++. can't write the pointer program in java. It means
java has restricted pointer support in Java.

Compiler and C++ uses compiler only. C++ is Java uses compiler and interpreter both. Java
Interpreter compiled and run using the source code is converted into bytecode at
compiler which converts source compilation time. The interpreter executes this
code into machine code so, C++ bytecode at runtime and produces output. Java is
is platform dependent. interpreted that is why it is platform independent.

Call by Value and Call C++ supports both call by value Java supports call by value only. There is no call
by reference and call by reference. by reference in java.

Structure and Union C++ supports structures and Java doesn't support structures and unions.
unions.

,Thread Support C++ doesn't have built-in Java has built-in thread support.
support for threads. It relies on
third-party libraries for thread
support.

Documentation C++ doesn't support Java supports documentation comment (/** ...
comment documentation comment. */) to create documentation for java source code.

Virtual Keyword C++ supports virtual keyword so Java has no virtual keyword. We can override all
that we can decide whether or non-static methods by default. In other words,
not override a function. non-static methods are virtual by default.

unsigned right C++ doesn't support >>> Java supports unsigned right shift >>> operator
shift >>> operator. that fills zero at the top for the negative numbers.
For positive numbers, it works same like >>
operator.

Inheritance Tree C++ creates a new inheritance Java uses a single inheritance tree always
tree always. because all classes are the child of Object class in
java. The object class is the root of
the inheritance tree in java.

Hardware C++ is nearer to hardware. Java is not so interactive with hardware.

, Object-oriented C++ is an object-oriented Java is also an object-oriented language.
language. However, in C However, everything (except fundamental types)
language, single root hierarchy is is an object in Java. It is a single root hierarchy as
not possible. everything gets derived from java.lang.Object.



3) List the features of Java Programming language.
There are the following features in Java Programming Language.

o Simple: Java is easy to learn. The syntax of Java is based on C++ which makes easier to write the program in it.



o Object-Oriented: Java follows the object-oriented paradigm which allows us to maintain our code as the combination of
different type of objects that incorporates both data and behavior.



o Portable: Java supports read-once-write-anywhere approach. We can execute the Java program on every machine. Java
program (.java) is converted to bytecode (.class) which can be easily run on every machine.



o Platform Independent: Java is a platform independent programming language. It is different from other programming
languages like C and C++ which needs a platform to be executed. Java comes with its platform on which its code is executed.
Java doesn't depend upon the operating system to be executed.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller arjyamaseal. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76800 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.49
  • (0)
  Add to cart