Tuesday, April 2, 2013

How to learn Java?

The best way to learn Java programming language fast is by learning from example programs and building your own programs. The javatheprogram.blogspot.com can be used to achieve this objective. The javatheprogram.blogspot.com site tries to provide you useful programs as many as possible that can help you learn Java fast and then you can build your own programs. You will find link to each program from the right navigation bar.

Compile and Run Java program

To compile and Run a Java program. You need to install JDK. The latest JDK version is 7. You can   download and install JDK from http://java.sun.com website. When you successfully install, you will have    javac command to compile and java command to run the program. Below are steps that may help you   compile and run Java program:

  1. Save the program in a folder. The file name and the class name are case-sensitive and must be the same.
  2. From command prompt window, change to the folder that contains the java file you just saved.
  3. Type javac filename (extension java) to compile the program. If any error is shown, read it and correct the source code and to run the program type java filename (without extension).

For example, The Java file name HelloWorld.java is saved in the D:\myprogram folder. To compile and   run the HelloWorld program in that folder, follow the steps below:

  1.  Type cmd in the search box near shutdown button (Windows 7) to open the prompt window
  2.  When the command prompt window is active, type D: to change to the D drive
  3. Then type cd myprogram to enter the myprogram folder
  4. When you are in myprogram, type javac HelloWorld.java to compile the program. When you  successfully compiled the program the HelloWorld.class file is created in the same folder.
  5. Type java HelloWorld to run the program.



compile and run Java program

33 comments:

  1. Very nice post, Keep sharing such a informative post.

    php training in chennai

    ReplyDelete

  2. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Ios training in chennai

    ReplyDelete
  3. Yes this the best way to learn Java programming language fast is by learning from example programs and building your own programs.


    One Day Tirupati Packages from Chennai | Tirupati Balaji Darshan Package from Chennai

    ReplyDelete
  4. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
    Thanks & Regards,
    VRIT Professionals,
    Web Designing Training Institute in Chennai.

    ReplyDelete
  5. I know this if off topic but I'm looking into starting my own blog and was curious what all is required to get set up? I'm assuming having a blog like yours would cost a pretty penny? I'm not very web smart so I'm not 100% sure. Any suggestions or advice would be greatly appreciated. Thanks content management system

    ReplyDelete
  6. Do you have a spam issue on this website; I also am a blogger, and I was curious about your situation; we have created some nice methods and we are looking to swap techniques with other folks, why not shoot me an e-mail if interested.
    seo consultant singapore

    ReplyDelete
  7. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your site? My blog site is in the exact same area of interest as yours and my users would genuinely benefit from some of the information you provide here. Please let me know if this ok with you. Thank you!
    homestay singapore foreign student

    ReplyDelete
  8. And you can buy a Z-helms/ Elemental wands for 1 messo. If by any chance you don't get a skill build the first time , you can try again.

    good web hosting service

    ReplyDelete
  9. If he comes back and says he owns 50% of it because he built half of it, you can then decide on a course of action.

    blog marketing

    ReplyDelete
  10. Howdy! This is kind of off topic but I need some guidance from an established blog. Is it very hard to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to start. Do you have any tips or suggestions? With thanks social media marketing tactics

    ReplyDelete
  11. Marketing information systems are tactical level information systems, which is used to support the middle level management working at marketing department.

    title tags

    ReplyDelete
  12. Hi there! This is kind of off topic but I need some advice from an established blog. Is it difficult to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about creating my own but I'm not sure where to start. Do you have any points or suggestions? Cheers Make Your Website SEO-Friendly

    ReplyDelete
  13. Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone! digital marketing jobs singapore

    ReplyDelete
  14. My developer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he's tryiong none the less. I've been using Movable-type on various websites for about a year and am anxious about switching to another platform. I have heard good things about blogengine.net. Is there a way I can transfer all my wordpress content into it? Any help would be really appreciated! marketing online

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete