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
package com.anemortalkid; | |
import java.awt.Desktop; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.KeyEvent; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.URISyntaxException; |
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
/** | |
* Not completed, hey dude at least give this a try and finish it instead of asking people to do your homework plox | |
*/ | |
public class EmptyRectangle { | |
private static String createXAxisWall(int width) { | |
String firstStar = "*"; | |
String midDashes = ""; | |
for (int i = 0; i < width - 2; i++) { | |
midDashes += "-"; |
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
public class StringReplaceStuff { | |
public static void main(String[] args) { | |
String testString = "Hello World!"; | |
// replace o with 0, replaceAll takes a string pattern to replace | |
String osReplaced = testString.replaceAll("o", "0"); | |
System.out.println("Without O = " + osReplaced); | |
// if we want to add to our replacement, we need to do it in different |
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
public class Animal { | |
private String name; | |
public Animal(String name) { | |
this.name = name; | |
} | |
public void setName(String name) { | |
this.name = name; |
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
public class Steve { | |
String input; | |
String[] steve = { "you", "can", "start", "by" }; | |
JFrame frame; | |
JTextField textField; | |
public Steve() { | |
frame = new JFrame(); | |
textField = new JTextField(); |
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.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
public class WhileLoop { | |
public static void main(String[] args) { | |
// assume this is the data from the file |
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
package com.anemortalid.essex.whatson.scrape; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; |
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
package com.anemortalid.essex.whatson.scrape; | |
import java.awt.Graphics; | |
import java.awt.image.BufferedImage; | |
import java.io.InputStream; | |
import java.net.URL; | |
import javax.imageio.ImageIO; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; |
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 |
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
public class Question { | |
private String question; | |
private String correctAnswer; | |
private String[] answerOptions; | |
public Question(String question, String correctAnswer, String[] answerOptions) { | |
this.question = question; | |
this.correctAnswer = correctAnswer; | |
this.answerOptions = answerOptions; |
OlderNewer