0 Members and 2 Guests are viewing this topic.
{0171,0157,0165,040,0150,0141,0166,0145,040,0154,0157,0163,0164,040,0164,0150,0145,040,0147,0141,0155,0145,056}
you have lost the game.
import java.util.*;public class Array{ public static void main(String[] args){ Scanner reader = new Scanner(System.in); String str = reader.nextLine(); String obfuscation = "{"; for(int i = 0; i < str.length(); i++){ obfuscation += "0" + Integer.toOctalString((int)str.charAt(i)); if(i + 1 != str.length()) obfuscation += ","; } obfuscation += "}"; System.out.println("encoded: " + obfuscation); }}
public class Array2{ public static void main(String[] args){ int[] ints = <output from first program>; for(int i: ints) System.out.print((char)i); }}
import java.util.*;public class Insult{ static Random r = new Random(); public static void main(String[] args){ System.out.println(randomStart() + randomAdj() + randomNoun() + "you " + randomPersonAdj() + randomInsult() + ". " + randomEnd()); Scanner reader = new Scanner(System.in); System.out.println("Want another opinion? (y/n)"); if(reader.nextLine().equalsIgnoreCase("y")) main(null); } public static String randomStart(){ String[] starts = {"What is this ","Why would you leave this ",}; return starts[r.nextInt(2)]; } public static String randomAdj(){ String[] adj = {"stupid ","blatant ","moronic ","abominable "}; return adj[r.nextInt(4)]; } public static String randomNoun(){ String[] noun = {"piece of garbage ","filth ","waste "}; return noun[r.nextInt(3)]; } public static String randomPersonAdj(){ String[] adj = {"deficient ","senseless ","rash ","puerile ","nonsensical ","thick headed ","fat ","pointless ","obtuse "}; return adj[r.nextInt(9)]; } public static String randomInsult(){ String[] insults = {"crud of the gene pool","failure","waste of breath","imbecile","incompetent monkey"}; return insults[r.nextInt(5)]; } public static String randomEnd(){ String[] ends = {"Get lost.","Go climb a mountain.","Why don't you leave?","Just stop. Stop it now.","Seriously? Vamoose.","The Game."}; return ends[r.nextInt(6)]; }}
import javax.swing.*;public class HelloWorldSwing{ public static void main(String args[]) { JFrame frame = new JFrame("Hello"); JLabel label = new JLabel("Hello, Swing World"); frame.getContentPane().add(label); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); }}
What's JFrame? Is it a derivative of java or is it a library, like JQuery for JS?