Java is born with some unique and interesting features that made it most powerful and demanded language of the times.
Following are the Java Features Buzz Words
"Java compiled file known as .class file can be executed on any OS without bothering on which platform (OS) the source code was compiled". That is, a Java source file can be compiled on any OS and executed on the same or any other OS. This is quiet contradictory to other languages like C/C++ where these languages should be executed on the same OS where they were compiled earlier. This Java feature is very unique and is unparalled by any other language from the day Java came into its existence, the year 1995; a period of 16 years.
Java's Magic Touch – Bytecode
Bytecode is a new term to the programming world introduced by Java. The compilation product of Java source file is a .class file consisting of bytecode. This bytecode makes Java platform-independent where as the binary code of C/C++ makes C/C++ platform-dependent.
The bytecode is not an ultimate format that is readily understood by the microprocessor. It must be converted into binary code format that can be processed by the microprocessor directly. This conversion is taken care by the JVM. The format conversion takes some time and thereby Java executes slower. Incase of C/C++, they contain binary code directly. The slow nature is overcome to some extent with the introduction of JIT (Just-In-Time) compiler . Following figure gives the concept.
Java Compiler – Is Platform-Independent?
A compiler job is to compile the source code into an executable file. An executable file, as the name indicates, gives output when executed. Every OS comes with its own set of functions and for every OS operation, the OS makes a function call to do the job. The functions may relate to the resource management like file system, memory and thread operations. Every OS comes with its own functions written in proprietory code. The compiler should thoroughly understand these functions. For this reason, the compilers are different for different operating systems. For example, a C/C++ compiler developed for UNIX understands the functions of UNIX but not that of Windows.
For the above rule, Java compiler is not an exception. A Java compiler developed and executed on UNIX does not work on Macintosh etc. That is, Java compiler, like any other compiler, is platform-dependent. The difference with Java compiler is it produces a platform-independent executable file known as .class file. Following figure explains.
Note: The .class file is not really an executable file because it must be converted in binary code specific to the OS at execution time.
Portability for Java comes from its bytecode. A Java .class file, obtained from the compilation on one platform can be ported or carried, for execution, to a different platform. The necessity is to have a compatible JVM (specific to the platform). JDKs are different for different platforms.
3. Simple and Familiar
The main motto of Java designers is to take out the language very simple to practice and develop the code. Many confusing concepts of C++ are simply deleted from Java and right now Java proved that a language can exist without these concepts. Following list gives a few concepts not supported by Java but supported by other object-oriented languages like C++.
1. No support for pointers.
2. No "goto" keyword. The minus point of "goto" is that you loose the command on control flow of the code and thereby debugging becomes a nightmare.
3. No support for unsigned data types.
4. No operator overloading.
5. No preprocessor directives (# define).
6. No multiple inheritance.
7. No garbage values for unassigned data types.
8. No explicit memory management by the developer. Memory management is taken care implicitly.
9. No structures, no templates and no unions.
Java looks as if it is a known language, familiar earlier, as much of the syntax is borrowed from C/C++. The control structures, functions, arrays and data types etc. looks the same of C/C++. Even though it is a derivative of C++, Java is fully an independent language where the execution entity is a class.
Encapsulation, Inheritance and Polymorphism, the three object-oriented principles are duly supported by Java. Object-oriented methodology aims at reusability of code written only once earlier. Java supports reusability through composition and inheritance. Everything can be viewed as an object; to achieve this, the Java API includes a plethora of classes like java.lang.Integer (to treat a primitive data type as an object), java.io.File (to view an ordinary text file as an object) and java.net.URL (to convert an IP address of a system into an object) etc. Apart this, Java supports dynamic binding and static binding of methods and object casting etc.
Benefits of OOPs
OOPS comes with many advantages over procedure-oriented languages useful for product architects and programmers. The main and foremost advantage is productivity with low-maintenance cost. Following list illustrates a few important.
1. With Java design patterns, the product architects can develop modules that can be integrated later to evolve as a big reusable component.
2. Using objects, a programmer can divide his work into a number entities (units) and coding each entity separately.
3. Data hiding helps to hide the data of one entity (unit or object) from another. This helps to write secured programs that cannot be accessed by other parts of the code.
4. With encapsulation, the same data (variables) can co-exist with different objects but without overlapping and ambiguity.
5. Due to encapsulation, software complexity can be reduced.
6. Inheritance helps reusability of code by avoiding redundancy.
7. Object-oriented systems can be scaled up easily from small to medium or medium to large business systems.
8. Using objects, message servicing systems can be developed easily to integrate modules of a business process.
5. Architecture Neutral
We know earlier, the Java compiler generates an intermediary bytecode that must be again converted into binary code at execution time. This binary code conversion is effected by the JVM. The bytecode is OS architecture neutral. Any OS can execute the bytecode without bothering its architecture.
Java is a robust language which avoids many mistakes a programmer can commit at coding level. First and foremost towards this goal is exception handling mechanism which takes care of user's mistakes at runtime. Java includes a strong type checking for objects and data types both at compile time and runtime. Variables must be assigned before they are used. Array size should not be given in initialization.
Java comes with implicit memory management which takes care of many mistakes a programmer can commit in coding. Java eliminates the memory manipulations functions like free() or delete() etc.
Java started its development for Web-based communication. Java is a strong supporter of Web. Java comes with special programs, Applets and Servlets useful for Internet (Web) communication.
Applets placed on client-side can communicate with servlets placed on server-side. Applets written in Java can be downloaded from any Web server and executed on any client system irrespective of OS.
8. Implicit Memory Management
We know earlier, one of the striking features of Java is its implicit memory management. It avoids much of the tedious code of memory management by the programmer. If a programmer does not manage the memory robustly with utmost care, as in C/C++, the system may crash sometimes while executing the program. The programmer is relieved of the usage of destructors and many functions like malloc(), calloc(), sizeof(), free() and delete() etc.
When Java software starts, it spawns a garbage collector (gc) thread that takes cares of the garbage of a process. The objects not required in further process of a program are treated as garbage. Keeping the memory for unwanted objects is a wastage. The garbage collector removes these garbage objects while execution is going on; even without a message or warning to the programmer.
Generally, a language like C/C++ is compiled or a HTML is parsed or VBScript is interpreted; but Java is both compiled and interpreted. At compilation stage, the Java source code is converted into a bytecode file. As bytecode cannot be executed by a microprocessor, at runtime, the JVM converts the bytecode into binary code. This platform-specific binary code is executed and generates output. That is, in Java, from source code to the output, two stages exist – compilation and interpretation.
No language can parallel Java in networking support. Java supports both LAN programming (TCP/IP and UDP) and distributed programming. In distributed computing, the systems in communication are spread across the globe. Again this is of two types – Internet-based and non internet-based. Java includes sockets and server sockets to support socket (LAN) programming (with java.net package), servlets and JSP (with javax.servlet.http package) for Internet-based programming and RMI/EJB (with java.rmi and javax.ejb packages) to support distributed non Internet-based communication. Java wisely knows the utilization of HTTP, SMTP, POP3 and FTP protocols etc. to communicate between systems.
For latest computing techniques, multitasking is a must as in multimedia (animation). Multitasking is a concept supported by OS. A language can utilize effectively the multitasking capabilities of an OS. Java too feels its necessity and supports through its built-in classes from java.lang package. Java supports multitasking through multithreading. A single Java process can be divided into multiple threads and each thread can be given a different task. If one thread's execution stops for some reason, the microprocessor can be assigned with the task of another thread. This shifting of threads reduces microprocessor idle time and thereby output is given at an earliest and looks at the same time.
Generally in coding, one class may require the functionality of another class. At runtime, JRE can search, hook and load the necessary classes required for the smooth execution of the program. Do not bother where the files are, may be on your own local disk or in a server at a far off place, JRE knows well how to play the game dynamically. Java has got built-in support for many protocols like HTTP and FTP using which the JRE can download the classes, files and libraries required for the execution of a program.
Java, with its good support for distributed technology, comes with many security features required in programming. Java does not support pointers and thereby avoids accidental erasures or changes of the values existing in a different location. Bytecode verifier checks the permissions in between the classes whether they can access or not. Java includes encryption algorithms that can be used by the programmer in distributed communication. Applets are not permitted to access the hard disk files and software.
We know earlier, Java is slower in its execution. To enhance the performance, the designers took utmost care in designing the API libraries like introducing StringBuffer in place of String, StringBuilder in place of StringBuffer, lightweight Swing GUI components in place of AWT heavyweight components. ArrayList (methods are not synchronized) can be used for Vector (methods are synchronized).
Also learn Java drawbacks.
Pass your suggestions or comments to improve this tutorial "Java Features Buzz Words".
36 thoughts on “Java Features Buzz Words”
can u plz explain the difference of Pojo ,Dao and Bean class
Awaiting for ur early reply
It’s a way that everyone need to learn the alphabet before knowing how to read and write. My friend had a question like: Why do people choose Java?So that i wanted to clarify her doubt. From your article i got a extra knowledge about Java and its features. Thank You for your knowledgeable words. And yes, these Features of Java makes java as a Popular Language and to add more on, Java is considered to be important for its platform independence, portability, and security. And i had a confusion between Platform independence and portability like is it both are similar?, but they both are different. Transferring from single platform to another is known as portability whereas platform independence refers to the application which can run on any operating system. These are the knowledge i had about features of Java. You have mentioned some excellent features which makes an important role in the popularity of Java language. Generally, the features of Java are also known as java buzzwords. We all learnt the features of Java which helps us get better knowledge of the Java language and also why it became so popular over years.
Is the java app developed so that we can access amd refer the topics
I want Java 8 tutorial .
I am preparing for OCJP.
So i need to know , which version of java i need to prepare?
Also may i know current stable version of java? and which version the companies are using now? so that i can prepare for exam/test/interview.
Depends on the company. Prepare for JDK 1.8, latest version. It is stable latest.
Hi sir, Good Evening,,
Greetings for the Day !!!
This is Manikantan Raju Kesipeddi, 2014 Pass-out from ECE Background. Frankly Speaking i was in Wrong Track in my BTech, As i was like being a Electronic student i’ll go through Central govt jobs through GATE only and wasted my valuable Time and Money by Taking GATE coaching, I was like saying “NO” to Software at that time. But later i realized after completing my BTech that it’s hard to get Achieve through GATE.
Due to some Financial conditions i joined in some Other MNC company as “”Order Processing Consultant for DELL Process”” then i again realized that – It’s not my cup of Tea…I worked for 7months their Now, I left that job and planning to move through software jobs by Taking Java Coaching (with My money what i earned in my job)… I don’t have any Knowledge in JAVA…But i have basic knowledge in C language.
Can i learn Java Through This Website(Real Time) ??? If not…
As a Senior and a Well Wisher, Can u please Suggest Where to Join to get Real Time Experience in Java Programming as a software Developer ??’
Please Suggest sir..Awaiting for Valuable Reply …
This site increases your Java knowledge. Basically, you must undergo a full training in Java. Before that, have a thorough knowledge of either C or C++; it is advisable. For Java, the best one is Durga soft, Maitrivanam, Ameerpet, Hyd.
Super like sir.
Thank you such post.
Wish you good luck ahed.
God bless you.
Keep posting such things.
Is it possible to download the documents from your site.
Please respond AS Early as possible.
nice post very helpful. features are explained clearly than other sites. thank you
sir I need text book of java with easy understand for beginners did u wrote java text book sir and text book is available in bookstalls are not tell me sir
Best one is this Web site.
Any textbook gives a limited knowledge. Go for google.
Hi sir what is the difference between jdk and jre as per functionality?
JDK contains a compiler, JVM, standard libraries, class loader etc. JVM with libraries is known as JRE. JVM is responsible for execution by converting platform-independent bytecode to platform-dependent binary code.
gud eveng sir….!
this is subhan, i have dought about the jsp life cycle methods.
some places i saw the jsp life cycle methods are init(config),service(req,res),destroy()….! , in some places jspInit(),_jspServlet(),jspDestroy()………!
but i am justify which methods are life cycle methods,
please tell me sir…
thanking you sir,
init(config),service(req,res),destroy() are servlet life cycle methods.
jspInit(),_jspServlet(),jspDestroy() are JSP life cycle methods.
what are the new features added in java 1.6 and 1.7 (Asked in interview)
sir..thanks,but how can i get the videos related with java???
The web gives number of videos.
Sir this site is very Good… Ex-plane every topic is deeply … Nice site sir.. I completed B.E.(CSE) At that time I m Searching a job on as a Software (Java)developer.
Sir ji java kya vidoes tutorial bhi h kya …………………help me .becouse at this time i am in first year so l want to learn the java or c/c++ language ……………………..this sites is also very goooooooooooooooooood but i want to learn form vidoes tutorils send websits on my email id [email protected] four fatihfully vicky
I did not prepare any videos on Java. But a lot of stuff is available in the net.
Please add more solved java programs with explanations.
this site was really excellent..
this is very helpful to us
but is there any chance 4 us to download all these topics..??
pls send me da reply as soon as possible..
R.Chaitanya Kumar raju
No you cannot right now. It make take a couple of months for to this. I am converting this into an iPhone and Android applications and will be placed in web app store.
Hi Sir, Is that android application is available ? it would be more helpful if that is there. This site is amazing. I learned all the Core JAVA topics from this site. Thank you so much for providing this site to us.
sir this site is very Good… The language you explained can understand even telugu medium background student… Nice site sir.. I completed MCA.. At present Iam an jr.software engineer(java) developer…
Oh, Nice. Tell your colleagues also to refer.
this is very good site to learn the java sir please also mention objective type questions which are related to sjp & ocjp
OK, I will do that.
I have gone through your site. It is very helpful. But while knowing few things, I faced a problem. When we search for some topic in the site, it shows all the related topics but not the complete explanation of that particular topic with examples. Can u please provide examples for few topics where we need to concentrate more…..
It comes in Website organization. We are thinking how to do it.
S N Rao.