ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
Diff between C++ and java?
 Question Submitted By :: Sivasubramanian.k
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Diff between C++ and java?
Answer
# 1
In C++ there is concept of pointers for memory management 
but there is garbage collecor in Java which automatically 
allocates and frees memory after the particular scope in 
the code...In C++ it supports concept of multiple 
inheritance but for java instead of multiple inheritance 
there is concept of interface...
 
Is This Answer Correct ?    5 Yes 0 No
Sivasubramanian.k
 
  Re: Diff between C++ and java?
Answer
# 2
in java we must need atleast one class to define our code
 
Is This Answer Correct ?    2 Yes 0 No
Shyam Kumar
 
 
 
  Re: Diff between C++ and java?
Answer
# 3
in java we must need atleast one class to define our 
code...but in c++ we can also define it without a class..
 
Is This Answer Correct ?    0 Yes 0 No
Pathi
 
  Re: Diff between C++ and java?
Answer
# 4
Java is Pure Object Oriented while C++ is not .
 
Is This Answer Correct ?    1 Yes 3 No
Hanu
 
  Re: Diff between C++ and java?
Answer
# 5
c++ is an object oriented language. but java is pure object 
oriented language.in java all properties are based on 
classes and objects.but in c++ we can write and execute the
program with out using class.
 
Is This Answer Correct ?    1 Yes 0 No
Sakthivel(gceb)(n.p)pollachi
 
  Re: Diff between C++ and java?
Answer
# 6
In c++,there is destructor but in java there is no 
destructor.
c++ programs are faster than java programs.
c++ supports multiple inheritance whereas java does not.
in c++ , we can write programs without classes but in java 
we have to use classes .
 
Is This Answer Correct ?    2 Yes 0 No
Ruchi
 
  Re: Diff between C++ and java?
Answer
# 7
Java is interpreted. This means that java source code is
compiled once, but it has to be interpreted by the JVM (Java
Virtual Machine) everytime the programme is executed. On the
other hand, C++ is not. C++ source code will compile once,
but it is NOT interpreted everytime the programme runs,
because C++ code is converted directly to machine language
instructions (in the machine that the C++ programme was
compiled). This is the reason why C++ is NOT portable.

Java is portable. This means that any Java programme can be
executed in any machine, provided that it has a JVM. C++
applications can only be executed in the machine in which
they were created (or in some cases, in similar machines
e.g. a C++ application that was writen in a computer under
the Windows XP Operating System, it will probably run in
other computers with Windows XP and maybe in computers with
other Windows versions, but certainly not in a cell phone).

That's why Java programmes are slower. They have to be
interpreted at runtime and this yields some overhead. This
is the efficiency - portability trade-off. Java applications
are portable, but C++ applications are executed faster.

Finally, there are some ways to overcome this trade-off from
both languages' point of view, but this is not the subject
of the question.
 
Is This Answer Correct ?    2 Yes 0 No
Blue Arkos
 
  Re: Diff between C++ and java?
Answer
# 8
Java is simply different from C++.Because it do some 
modification to c++ then after it publish..So there are 6 
major difference here i can explain.These are 

1-java doesn't support predessors.Where as C++ support this.
2-Java doesnot support Multiple inheritance however it use 
this by using interface.
3-Java doesn't contain any pointer value.
4-Java have no template class.
5-Java doesn't contain any datatype such as 
struct,enum,union.
6-Java have no Go to keyword.

Above these points are not supported by java , but 
supported by c++.So these are the difference between java 
and c++.
 
Is This Answer Correct ?    0 Yes 0 No
Gyana
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What are the OOPS concepts in Java ? Satyam3
Difference between String and String Buffer?  3
What is the purpose of setAutoCommit() ? Google1
What will happens if you opened Internet Explorer 4 times?  2
Can you call a private data from an inner class?  3
What are Access Specifiers and Access Modifiers. TCS4
Explain difference between final, finally and finalize?  2
What is a serializable interface?  3
What is audio clip interface? Name few methods of it ?  1
Why we use static and synchronized in method for single thread model example: public static synchronized add(){}  1
What is a Wrapper class?  9
Define interface?  2
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com  1
Difference between the String and StringBuffer classes?  3
perpare on factorypattern,linklist wothout using collection, (multitharding ie create producer/customer therad producer create Queue continuesly,consumer consume queue, consumer wait if queue is full,producer wait if queue is empty),diff betn sleep(1000)&wait(1000) these r the main Q ask in huawei(2008) Huawei1
What is Servlet?  8
diff b/w sleep(1000) and wait(1000)? Huawei2
what is the difference between pagecontext and servletcontext? JBA-Infotech4
what is web.xml?and its use? CTS6
What is stop(), suspend(), resume() method?  3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com