Instantly share code, notes, and snippets.

View syllable.java
import java.util.*;
/**
* Write a description of class syllable here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class syllable
{
public static void main(String args[]){
View advisorySnack.java
import java.util.*;
public class advisorySnacks {
public static void main(String[] args) {
// Creating an ArrayList of String
List<String> students = new ArrayList<>();
// Adding new elements to the ArrayList
students.add("Sameer");//
View arrayListAssignment.java
import java.util.*;
public class ArrayListAssignment {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
//int y = scan.nextInt();
ArrayList<Integer> ages = new ArrayList<Integer>();
boolean keepAsking = true;
System.out.println("Type in at least 6 ages of you and your family. After 6 ages, type in a negative number to continue.");
View factorial.java
public class factoral{
public factoral(){
System.out.println(factorial(6));
}
public int factorial(int n){
int product = 1;
for(int i = 1; i <= n; i++){
product *= i;
}
return product;
View chat2.java
/**
* 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
View magpie.java
/**
* 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
View fractals.java
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;
View recursion.java
/**
* Write a description of class recursive here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class recursive
{
public recursive()
View grades.java
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[]){
View highest.java
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[]){