This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
* Compilation: javac HelloWorld.java | |
* Execution: java HelloWorld | |
* | |
* Prints "Hello, World". By tradition, this is everyone's first program. | |
* | |
* % java HelloWorld | |
* Hello, World | |
* | |
* These 17 lines of text are comments. They are not part of the program; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class tempConverter | |
{ | |
public static void main(String args[]){ | |
//initialze variables | |
double startTemp = 0; | |
int whichConversion; | |
double endTemp = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class makeChange | |
{ | |
public static void main(String args[]){ | |
//class variables | |
//make random number | |
int max = 1800; | |
int min = 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class isAPrime | |
{ | |
Scanner scan = new Scanner(System.in); | |
public isAPrime(){ | |
System.out.println("Enter a number to test if its prime"); | |
class variables | |
int y = scan.nextInt(); | |
int count = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/** | |
* Write a description of class strings here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class highest | |
{ | |
public static void main(String args[]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/** | |
* Write a description of class strings here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class grades | |
{ | |
public static void main(String args[]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write a description of class recursive here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class recursive | |
{ | |
public recursive() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.Color; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A program to carry on conversations with a human user. | |
* This is the initial version that: | |
* <ul><li> | |
* Uses indexOf to find strings | |
* </li><li> | |
* Handles responding to simple words and phrases | |
* </li></ul> | |
* This version uses a nested if to handle default responses. | |
* @author Laurie White |
OlderNewer