Posts

Showing posts from January, 2018

How java is different from c/c++?

How java is different from c? 1. C is structured oriented language(POP) while java is object oriented langauge and has mechanism to define classes and objects. 2. Java does not support an explicit pointer type. 3. Java does not have preprocessor, so we cannot use #define,#include and #ifdef statements. 3. java does not include struct enum and union datatype. 4. Java does not include keyword like goto, sizeof, typedef. 5. Java adds labelled break and continue statement. 6. Java adds many feature required for OOP How Java is different from C++? Features removed in java. 1. Java does not support pointers to void  i.e unauthorized access to memory. 2. Java does not include struct, enum,  union datatype. 3. Java does not support operator overloading. 4. Preprocessor plays less role in C++ and so eliminated entirely in Java. 5. Java does not perform automatic type conversion and result in loss of precision. 6. Java does not support global variables.Ever

My First java program

//This is my first java program public class simple {      public static void Void main( String[] args) {       system.out.println("hello java"); } }//no semicolan when class ends in java output : hello java class can be defined as a template/blueprint that describes the behavior/state that the object of its type supports public It is an keyword an access modifier which represents visibility it means it means it is visible to all. static is a keyword ,if we declare any method(in java we call function as a method) static it is known as static method.The core advantage of static method is that there is no need to create object to invoke the static(method).The main method is executed by the JVM , so it doesn't require to create object to invoke the main method. So it also saves Memory.   void it is a return type, it does not return any value. main represents start up of the program. String[] args is used for command line argument sy

Recommended Books To Learn Java

Recommended Books To Learn Java : 1. Herbert Schildt , “The Complete Reference Java  2” ,  Tata McGraw-Hill. 2. Joyce Farrell, “Java for Beginners”, Cengage Learning.   3. J. Nino and F.A. Hosch, “An Introduction to programming and OO design using Java”, John Wiley & Sons.   4. Y. Daniel Liang, “Introduction to Java programming”, Pearson education. 

Intoduction of java

Welcome to the Myprojectcse Interactive Java Tutorial. Whether you are an experienced programmer or not, this blog is intended for everyone who wishes to learn the Java programming language. HISTORY James Gosling initiated Java language project in June 1991 for use in one of his many settop box projects. The language, initially called ‘Oak’ after an oak tree that stood outside Gosling's office, also went by the name ‘Green’ and ended up later being renamed as Java, from a list of random words. Sun released the first public implementation as Java 1.0 in 1995. It promised Write Once, Run Anywhere (WORA), providing no-cost run-times on popular platforms. On 13 November, 2006, Sun released much of Java as free and open source software under the terms of the GNU General Public License (GPL). On 8 May, 2007, Sun finished the process, making all of Java's core code free and opensource, aside from a small portion of code to which Sun did not hold the copyright. INTRODUCTION