Tag Archives: Java

Java – Create Arrays

Data structures are a key feature in any programming language, enabling pieces of data to be stored and processed together as a single object.  Java provides several categories of data structures, such as arrays and collections. An array is a … Continue reading

Posted in Class Notes | Tagged , | Comments Off on Java – Create Arrays

Commenting in Java

/* block comments */ Programmers may use a block comment at the beginning of a program to describe the entire program, or in the body of a program to describe the function of a specific method. /** doc comments */ … Continue reading

Posted in Programming | Tagged | Comments Off on Commenting in Java

Methods from the Math Class

Purpose: The Math class contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions. Examples: Method Description Example Code Result abs() Absolute value Math.abs(-75) 75 max() Higher of two numbers Math.max(99,41) 99 … Continue reading

Posted in Programming | Tagged | Comments Off on Methods from the Math Class

Beginning Java

public class BeginningJava { public static void main(String[] args) { System.out.println(“This is a String”); } } This program is written on seven lines, and its only task is to print “This is a String” on the screen. Some things you … Continue reading

Posted in Programming | Tagged | Comments Off on Beginning Java

Mortgage GUI

/* Mortgage program Programmer: Me Date: November 8, 2009 File Name: MortgageGUI5.java This Java program (with GUI) allows the user to select which way they want to caculate a mortgage: input of the amount ot fthe mortgage, the term of … Continue reading

Posted in Homework | Tagged | Comments Off on Mortgage GUI