Important alert: (current site time 6/18/2013 9:13:49 PM EDT)
 

winzip icon

A Basic First Java Program aka A Second Cup of Java

Email
Submitted on: 5/14/2012 4:43:36 PM
By: Ronald Holland  
Level: Beginner
User Rating: By 3 Users
Compatibility: Java (JDK 1.2), Java (JDK 1.3), Java (JDK 1.4)
Views: 22184
(About the author)
 
     This tutorial will build on and reinforce what you learned from The First Cup of Java tutorial. This tutorial will expand on: 1. What is a class? 2. The Hello World application. 3. The Hello World applet. We will discuss the term template as we ease into this tutorial as we build the following: 1. MyApp - builds an application that shows how to add, multiply and find the average of three numbers entered by the user. 2. MyApp1 - shows how to build a simple Hello application that gets the user's name. 3. MyApplet - builds an applet that shows how to add, multiply and find the average of three numbers entered by the user. 4. MyApplet1 - shows how to build a simple Hello applet that gets the user's name. 5. MyCalc - builds a four function calculator application with the following functions: * Addition * Subtraction * Multiplication * Division * Chained operations 5. MyCalcApp - builds a four function calculator applet with the following functions: * Addition * Subtraction * Multiplication * Division * Chained operations

 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//HTML for :A Basic First Java Program aka A Second Cup of Java
//**************************************
SecondCupOfJava.html
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 24 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

12/7/2004 5:58:32 PMclifford edward burns

why would you post something like this
(If this comment was disrespectful, please report it.)

 
12/12/2004 6:57:29 AMRonald Holland

Mr. Burns,

What type of examples would you be interested in seeing posted?
(If this comment was disrespectful, please report it.)

 
1/8/2005 1:42:08 AM

tryrtyrty
(If this comment was disrespectful, please report it.)

 
11/1/2005 3:15:44 PMYash

This is good for beginner.
(If this comment was disrespectful, please report it.)

 
12/25/2008 12:45:51 PMRaju Rajan

great tutorial.
(If this comment was disrespectful, please report it.)

 
12/27/2008 10:05:14 AMRonald Holland

Raju Rajan,

Thanx for the comments. I hope this tutorial was helpful. Ron
(If this comment was disrespectful, please report it.)

 
4/10/2010 5:38:00 AMT.Jackson

This is alright, and he's even giving you documentation. Why the he*l are you throwing stones at this guy for?
(If this comment was disrespectful, please report it.)

 
4/10/2010 5:51:14 AMT.Jackson

Hey Ronald, you interested in porting my Blaster Master to Java? The C# code is there -- I think you'd pull it off pretty quick. Be an interesting exercise to bench test the two C# Vs Java.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.