Skip to content

Instantly share code, notes, and snippets.

/******************************************************************************
* 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;
import java.util.*;
public class tempConverter
{
public static void main(String args[]){
//initialze variables
double startTemp = 0;
int whichConversion;
double endTemp = 0;
import java.util.*;
/**/
import java.util.*;
public class makeChange
{
public static void main(String args[]){
//class variables
//make random number
int max = 1800;
int min = 100;
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;
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[]){
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[]){
/**
* Write a description of class recursive here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class recursive
{
public recursive()
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;
/**
* 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