Posts

JUMP STATEMENTS in JAVA

JUMP STATEMENTS                                                                                          Java supports three jump statements: break, continue, and return. These statements transfer control to another part of your program. 1. break. 2. continue. 3. return. 1 The break statement ·          This statement is used to jump out of a loop. ·          On encountering a break statement within a loop, the execution continues with the   next statement outside the loop. ·          The remaining statements which are after the break and within the loop are skipped. ·          Break statement can also be used with the label of a statement. ·          A statement can be labeled as follows. statementName : SomeJavaStatement ·          When we use break statement along with label as break statementName; An example of break statement class break1 { public static void main(String args[]) { int i = 1; while (i<=10) { System

Difference Between C++ and JAVA

C++ Java C++ was developed by  Bjarne Stroustrup . Development began in 1979. Java was developed by  James Gosling  and his team. Development began in 1991. C++ is a  compiled language . Java is both  compiled and interpreted . C++ programs are  platform dependent . They need to be compiled for a particular platform. Java programs are platform independent. C++ does support  operator overloading . Function overloading is also available. Java does not support operator overloading. However, function overloading is possible. C++ fully support  pointers . Java has restricted support for pointers. Pointers are supported internally you can not writer pointer programs. C++ supports  structures and union . Java does not support structures and union. C++ supports manual  object management  through  new  and  delete  keywords . Java relies on automatic  garbage collection . It does not support destructors t

Difference Between C and JAVA

C Java Procedure Oriented Programming Language True Object oriented Programming Language C    was developed by  Dennis Ritchie .. Java was developed by  James Gosling  and his team. Development began in 1991. C is a  compiled language . Java is both  compiled and interpreted . C    programs are  platform dependent . They need to be compiled for a particular platform. Java programs are platform independent. C supports global variables Java does not supports global variables C    fully support  pointers . Java has restricted support for pointers. Pointers are supported internally you cannot writer pointer programs. C    supports  structures and union . Java does not support structures and union. C supports Preprocessors header files Java does not C supports Preprocessors header files C    supports  goto  statement (however the use of goto is discouraged as not considered a good practice) Jav

JAVA Features

                                                                                                              As we know that the Java is an object oriented programming language developed by Sun Microsystems of USA in 1991. Java is first programming language which is not attached with any particular hardware or operating system. Program developed in Java can be executed anywhere and on any system. Features of Java are as follows:  1. Compiled and Interpreted 2. Platform Independent and portable 3. Object- oriented 4. Robust and secure 5. Distributed 6. Familiar, simple and small 7. Multithreaded and Interactive 8. High performance 9. Dynamic and Extensible 1. Compiled and Interpreted -     Basically a computer language is either compiled or interpreted. Java comes together both these approach thus making Java a two-stage system. Java compiler translates Java code to Byte code instructions and Java Interpreter generate machine code that can be directly