How to create a Java Program :
There are two ways to create a Java program
1. Using a text editor : To create a Java application we can use any editor and start typing the code. Since JDK does not contain an editor, the Windows users can use Notepad whereas the user of Linux can user Vi or any other editor. You can even download any third party editor from the internet. Some people may ask if they can use Ms-Word for developing Java programs, the answer is yes, but you should not do it. Since the source code of a program is not expected to look attractive, the use of word processors like Ms-Word, WordPad or Write(OpenOffice) is not recommended. also these application will require more memory when compared to Notepad and some of them like Ms-Word are to be purchased and installed separately also.
2. Using an IDE (Integrated Development Environment) : IDE stands for integrated development Environment. It is a collection of facilities provided to the users. Database designer and application programmers use it. An IDE simplifies the tasks of creating and using an IDE for application development offer a much advanced environment for
creating,testing and debugging programs. An IDE is a software that offers many tools and options for a programmer to create a program easily. There are many IDE's available for Java some of them are -
NetBeans, Eclipse, JDeveloper etc. Most of the IDE's are a free download from the internet. It is not that IDE's are availble for Java only. Almost all the languages have their IDEs'. For example, for creating applications using Visual Basic and Visual C#, we can use Visual Studio.Net IDE similarly applications like DreamWeaver, ExpressionWeb are IDE's for HTML.
What should you use an editor or an IDE ?
If you are just starting with Java it is always better to start with an editor. Why ? because an editor will NOT help you in creating programs. Yes, you read it right - it will NOT help you in developing programs since it is not designed to so. When there is no help from the system you will have to write the code, test the program and debug it all by yourself. This will make you understand how a java program is created, how errors occur, the different type of errors and how to correct them. Writing the statments again and again will also make you more familar with the Java environment. Of course you will have to work hard but that will make you a much efficient programmer. Once you are familiar with the Java environment it is adivsable that you leave the editor and start using an IDE. An IDE will make the whole programming experience very smooth as compared to an editor.One disadvantage with an IDE is that if you are new to the technology it will hinder your absolute learning of the given technology as it may resolve to hand holding in certain scenarios. On the flip side if you are familiar with the technology it has the potential to greatly reduce the manual effort across the board that can come with software development.
An IDE will offer you the following advantages
1. Readymade code : In an editor the user is required to type the whole code manually. Initially this effort helps you by making you memorise the code but later on rewriting the same code makes you feel bored. An IDE helps you by giving you readymade code.
2. Design time compiling : An IDE displays the errors at design time by underlining it. You can easily correct the error there itself.
3. Inbuilt Components : Advanced components like Buttons, TextFields, Label come ready made in an IDE whereas using an editor you have write the code to create them.
4. Auto completion of code : All IDEs support auto completion of code where you write the initial part of a statement and the rest is completed by the IDE itself.
5. Packaging : Once a project is complete an IDE has inbuilt tools to convert it to a ready to install application.
Disadvantages of an IDE:
1. IDE uses graphical interface. It requires more memory and processing power.
2. IDE are not suitable in case you want to learn the core of a language or you are fresher.
send freshers party programs
ReplyDelete