What is the difference between C++ and java?

Answer Posted / jenny bala

The major Difference between C++ and Java is,

1.C++ is not fully OOP language since we can write a program without class also, But in java we cannot write a program without class.

2.C++ is not fully platform independent where .class file is not generated if you didn't use class in your program. But in java all files will create .class file after compilation of program, so it's Fully platform independent.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you overcome the diamond problem in inheritance?

952


What is polymorphism in oops with example?

752


Why we use classes in oop?

758


What are the important components of cohesion?

736


What is an interface in oop?

768


What are the two different types of polymorphism?

874


What is the difference between procedural programming and oops?

762


Why is abstraction used?

830


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1852


what is the sylabus for priliminaries?

1890


Why do we use inheritance?

809


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6351


Why is oop useful?

805


What are functions in oop?

776


Why do we use encapsulation in oops?

743