Skip to content

Instantly share code, notes, and snippets.

View maf946's full-sized avatar

Marc Friedenberg maf946

  • State College, PA
View GitHub Profile
import java.io.*;
import java.util.Scanner;
public class Main
{
public static void writeFile()
{
PrintWriter out = null;
try
{
import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;
public class Main
{
public static ArrayList<String> readFile(){
String fileName = "textFile.txt";
ArrayList <String> namesArrayList = new ArrayList();
File fileToRead = new File(fileName);
public class Main
{
public static void exceptionThrower() throws Exception {
throw new Exception("Something bad happened");
}
public static void main(String[] args)
{
try
{
exceptionThrower();
// NOTE: You cannot run this entire text file at once in Java. Copy each model answer to IntelliJ to review.
// QUESTION 1
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package unit4ps21fa;
/**
*
* @author YOUR_NAME_HERE
package ultrablackjack;
import java.util.Scanner;
/**
*
* @author YOURNAMEHERE
*/
public class UltraBlackjack {
/**
package unit3practicequizmodel;
import java.util.Scanner;
/**
*
* @author marcfriedenberg
*/
public class Unit3PracticeQuizModel {
/**
* @param args the command line arguments
# Any line that begins with "#" is a comment, and will not be interpreted
# Printing "Hello, World"
## We have to begin with the O.G.
print("Hello, World!")
## We are using the print() "function," which is built into python. We are saying, I would like to print, and then
## including what we would like to print within the parentheses. We could also print an integer using the print function:
@maf946
maf946 / Brewfile
Last active December 29, 2020 01:18
tap "adoptopenjdk/openjdk"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
brew "python@3.9"
brew "cask"
brew "coreutils"
brew "docker"
brew "exercism"
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package currencyconversion;
import java.util.Scanner;
/**
*