Submitted by heartin on Fri, 10/24/2014 - 22:37
Java provides JAR files to bundle your application easily distribute. The jar command below create a JAR file called MyJar.jar and it will contain the myApp directory and myApp's entire subdirectory tree and files.
jar -cf MyJar.jar myApp
There are more options for jar which can be used for viewing the contents, unzipping etc. JAR stands for Java Archive and you can open it or extract it using any archiving tools like winzip or winrar. We will see jar files in detail later.
Submitted by heartin on Fri, 10/24/2014 - 03:55
There is a class in Java called Object and is present in the package java.lang.Object. This is different from the concept of objects in object oriented programing, and begenners may get confused. Note that is is just a class in Java with the name as Object.
Object class API basics
Submitted by heartin on Thu, 10/23/2014 - 12:25
Let us quickly look into compiled and interpreted languages and also where Java fits.
High level language vs. Machine Language
Humans prefer to use high level languages like Java, C, C++ etc. that form an abstraction over the platform/operating system specific code and are closer to their speaking language like English.
Submitted by heartin on Thu, 10/23/2014 - 10:07
The while statement
The “while loop” is an alternative to “for loop”. a “for loop” is usually used when the number of times the block is to be executed is known. A “while loop” is usually used when the number of times the block is to be executed is not known, like prompting the user whether to stop executing during every iteration.
The syntax of “while loop” is:
while (<condition>) <statements>;
Example:
Submitted by heartin on Tue, 10/21/2014 - 09:23
Collection framework in Java provides efficient implementations for commonly used data structures like list, set, queue, map etc. We can reuse these implementations without writing our own implementations when we need to use these data structures.
Pages