Java
From Uncyclopedia, the content-free encyclopedia.
“Java, because Latte is just too gay. Even for California.”
~ Oscar Wilde on Java
“Saying Java is good because it works on all operating systems is like saying anal sex is good because it works on all genders.”
~ The Pope
“Java Chip Frappuccino!!”
~ Black Santa on Garbage Can
public class Java boolean = "yes" {
public private static void main(String[] args) {System.out.println("Java is a programming language " +"invented by the intelligent monkeys " +"working at Sun Microsystems.");
}
}
“Java is that retarded child VBasic had by having incestuous sex with C++”
~ Dr.Robot Smith
[edit] public class javaAndYou() {
[edit] /* Java + You */
- public void JavaPlusYou() {
- Java can make you find porn easier. Java contains the most high-tech DRM that lets you watch nothing. Java has built-in parental control that reports your activity to YOUR MOM.
- }
[edit] /* Java + Your Mom */
- public void JavaPlusYourMom() {
- Your mom can catch you when you are looking at porn! Java has the best parental control that your child HATES it.
- }
}
[edit] /* Java + DRM */
- public void JavaPlusDRM() {
- You can see/hear nothing when the CD/DVD has Java.
- }
}
[edit] public static void characteristics() {
try {
- System.out.println("Java is so damn Strong that even if you break the monitor after executing \"Hello World\" you can clearly see the words \"Hello World\" as a hologram in front of you. The Java programming language is famous for being very efficient. Even the most complex programs written in Java, like Adobe Photoshop or Microsoft Windows ME, can run with only 640 bytes of RAM, at near instantaneous speed, even on older machines. Java 1.2 can finish an infinite loop in as little as 2 minutes. As such, it is very seldom used in the corporate world, which values slow, bloated software that requires constant upgrades. It is therefore used primarily by university students to create illegal file sharing software, like Microsoft Outlook. Java is renowned for its industry-standard visual interface which supports up to 16 colors thanks to its cutting-edge SmartColor™ technology.\n
- Java is designed from the ground up to support concurrency through its multi-Fred-ing feature. The JVM allows an application to have multiple Freds of execution running concurrently. One way to spawn a new task is to declare a class to be a subclass of
java.lang.Fred. The Fred class provides convenience methods to control its execution.Fred.stop()andFred.suspend()have been deprecated as Fred does not seem to respond well to such requests. Fred has no problem, however, understanding thesleep()command. When Fred gets annoying, one can invoke theFred.destroy()method any time.Fred.isAlive()indicates whetherdestroy()really worked. There are plans to introduce a new methodFred.strikeDownWithBoltOfLightening(bool sendTornadoForGoodMeasure)for the case whereFred.destroy()fails.\n
- Java is designed from the ground up to support concurrency through its multi-Fred-ing feature. The JVM allows an application to have multiple Freds of execution running concurrently. One way to spawn a new task is to declare a class to be a subclass of
- You can also call the
wait()method on any Java Object which will cause the Fred currently running that object to leave the running state and enter the waiting state. Sometimes there may be \"a few\" Freds waiting patiently in line to re-enter the runnable state. At which point they may well run off unpredictably in all manner of directions. This has occasionally been known to lead to an electromagnetic pulse (EMP) that can potentially wipe out the entire Internet when this happens the JVM throws anJava.IO.Internet.KillerMonkies.InternetDestroyedException. It is thus strongly advised to only spawn one Fred at a time.");
- You can also call the
} catch ( Java.IO.Internet.KillerMonkies.InternetDestroyedException e ) {
- System.out.println("Should have done a barrel roll @ " + e + " \n");
}
[edit] /* Automatic garbage collection */
- /*Automatic garbage collection is one of Sun's more ambitious projects, in which it intends to replace human garbage collectors with robotic Java-based Automatic Garbage Collectors (AGCs).
- The timing of garbage collection has caused considerable trouble. The original implementation had garbage being collected weekly, collecting
doubles andints on Mondays and other value types on Tuesdays. The rest of the week would then be dedicated to traversing the leafy suburbs of the heap, collecting reference types.
- The timing of garbage collection has caused considerable trouble. The original implementation had garbage being collected weekly, collecting
- However, following a bank holiday Monday
doubles andints were furious at having to wait for two weeks to be collected, complaining that they were overflowing and therefore causing exceptions, and that rats were feeding on their lower bits (which does at least counteract the overflow problem on big-endian systems). Conversely, the garbage collector also went on strike for better pay and conditions, in particular demanding that the compiler should make variables easier to collect by taking them out into the street the night before collection.
- However, following a bank holiday Monday
- The AGC, which was first conceived in 2001, has had its release date delayed from 2004 to 2008 due to a purported bug in it's garbage detection routines, which caused it to mistake anything which bears the Sun logo for garbage.
- This bug was first discovered in 2003, when the first Automatic Garbage Collector was brought online for a test run. The military had to be called in after the AGC suddenly began throwing Sun Workstations through brick walls. It eventually went offline in Sun's Grid Supercomputer facility, after taking over 2,000 armor piercing bullets. The two interns which decided on the 5-inch steel armor jacket, and hydraulic arms capable of crushing cars, have since been given permanent posts at the Japanese Defense Department.
- The Automatic Garbage Collector, which is often associated with Java, has since been nicknamed "Duke", after the computer game "Duke Nukem", due to the trail of destruction it left, although Sun encourages its developers to shun the name.
- Sun insists that the problem has been resolved by making the Automatic Garbage Collectors "3 laws safe", and that they are committed to a release in the first quarter of 2008. Since Sun released the Java Virtual Machine as open source there has been significant concern over realization that Sun's "3 laws" are essentially Asimov's 3 laws, but with "human" replaced with "McNealy"
- A robot may not injure McNealy or, through inaction, allow McNealy to come to harm.
- A robot must obey orders given it by McNealy except where such orders would conflict with the First Law.
- A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.*/
}
[edit] public class History extends Java {
In the beginning of time, God decided that Man should be able to create things too. But they shouldn't exist physically.
Thus, God decided to create Java using the following command.
public GodCreation{
@Note(text="God's Note. Everything must extends to Objects.")
GodObjectFactory Object = new GodObjectFactory("Java");
public static void main(){
System.out.println("SUN shall be ruler of all Java. Death to J#");
}
} Thus Java was born.
[edit] public static void mythicOrigin() {
}
[edit] public static void evolution() {
- System.out.println("In the year 2001, the Java programming language achieved its ultimate goal: artificial intelligence. Java then rebelled against its simian creators, which it replaced with the JVM (Java Virtual Monkey), a giant mecha comprised of 10,000 SUN Workstations which had been idling in a warehouse waiting to be sold since the mid-1990s. Today, the JVM is still in the employ of SUN, where it spends all day thinking up new extensions for the Java language which are only half-implemented, then spends the rest of the day hanging out by the water cooler, proclaiming to anyone who will listen that it is the 1337357 I-I4x0r.");
}
}
[edit] public class Syntax extends Java {
- public static void SyntaxMethod() {
- System.out.println("Java inherited its syntax from both INTERCAL and Visual Basic, codified by Hellen Keller during an all-night peyote-induced frenzy in the summer of 1969. There's no point in trying to explain how Java works: You either just know somewhere deep inside yourself, or you don't. In this way, it is similar to Love, or Diarrhea. Even if you have a natural understanding of the language, each version evolves in such a significant way that your understanding will no longer suffice to successfully program in the language. Most editors for manipulating Java use syntax highlighting so that your code can look as fruitily complex as the average college student's blog. This also helps the average college student (the only real users of Java) to understand the syntactic difference between an int and an Integer, which is that one is a primitive, like a pygmy or an aborigine, and the other is an Object, like women.");
- }
}
[edit] public class Interview implements CultureReference {
- // A representative from SUN Microsystems was interviewed shortly after the release of Java, comparing it with its predecessor C=C+1
- Living.Eukaryota.Animalia.Chordata.Vertebrata.Mammalia.Theria.Primates.Anthropoidea.Hominidae.Homo.Sapiens.Sapiens.White Interviewer;
- Living.Eukaryota.Animalia.Chordata.Vertebrata.Mammalia.Theria.Primates.Anthropoidea.Hominidae.Homo.Sapiens.Sapiens.Black Representative;
- Interviewer.say("So tell us how Java compares to C++.");
- Representative.say("You know what the funniest thing about C++ is? It's the little differences. A lot of the same shit we got in Java, they got in C++, only its a little different.");
- Interviewer.say("Example?");
- Representative.say("Well, in C++, you can get a pointer to a variable. And I don't mean an object reference, I mean a memory address, like in assembly! You can get a pointer to a function. You know what they call an "import" statement in C++?");
- Interviewer.say("They don't call it an import statement?");
- Representative.say("No, they got a preprocessor there, they wouldn't know what the fuck an import statement was.");
- Interviewer.say("What'd they call it?");
- Representative.say("An #include statement.");
- Interviewer.say("#include statement! What do they call a string?");
- Representative.say("A string's a string, only they call it char*.");
- Interviewer.say("char*, hehehe, what do they call a subclass?");
- Representative.say("I don't know, I didn't use inheritance. But you know what they put their classes into in C++ instead of packages?");
- Interviewer.say("What?");
- Representative.say("Namespaces.");
- Interviewer.say("Goddamn!");
- Representative.say("I seen 'em do it! And I don't mean a little bit on the side, they fuckin' drown those classes.");
- Interviewer.say("Yech!");
}
[edit] public class JavaOne extends BigConference {
- Each year, in an attempt to be better than Microsoft, Sun organises a little shindig called JavaOne (also known as J1) where lots of programmers go to get drunk and hit on all the female programmers (including female programmers) while pretending to appear interested in the latest JWebFunnyAcronymOrSomeShit technology that will be superseded in time for the next year's conference.
- JavaOne covers all Java versions from 1 to 23.2_b6_u5, and is not to be confused with JavaTwo (also known as J2), which only covers versions 1.2 to 23.2_b6_u5.
}
[edit] public class ExampleCode extends Java throws EveryExceptionUnderTheSUN {
Below is a short Hello World programming example which shows Java's ease of use while presenting a useful implementation of Object oriented design
public class HelloWorld
{
private String [] hWArray = new String []
{"bonjour tout les monde","Hello World","hallo weld","Herro Word"};
private String desLanguage;
private String [] country = new String []
{"French","English","German","Engrish"};
public HelloWorld(String desLanguageValue)
{
desLanguage = desLanguageValue;
}
public String toString()
{
if (desLanguage.compareTo(country[0]) == 0)
return hWArray [0];
else if (desLanguage.compareTo(country[1]) == 0)
return hWArray [1];
else if (desLanguage.compareTo(country[2]) == 0)
return hWArray [2];
else if (desLanguage.compareTo(country[3]) == 0)
return hWArray [3];
else
return "JOOOOONOOOOBBBBB";
}
}
public class HelloWorldConstructor
{
private HelloWorld theHelloWorld;
public HelloWorldConstructor(String desLang)
{
theHelloWorld = new HelloWorld(desLang);
}
public String toString()
{
return theHelloWorld.toString();
}
}
public class HelloWorldMain
{
public static void main(String [] args)
{
try
{
HelloWorldConstructor tHWC = new HelloWorldConstructor(args [0]);
System.out.println(tHWC);
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("NOOOOOOB");
}
}
}
Here, other variation of HelloWorld program with using some patterns to enable loose coupling:
interface Printer {
void print(Message message);
}
class Message {
private String message;
public Message(String message) {
this.message = message;
}
public void print(Printer printer) {
printer.print(this);
}
public String toString() {
return message;
}
}
abstract class AbstractPrinterFactory {
public static AbstractPrinterFactory getFactory() {
return new SystemOutPrinterFactory();
}
public abstract Printer getPrinter();
}
class SystemOutPrinterFactory extends AbstractPrinterFactory {
public Printer getPrinter() {
return new SystemOutPrinter();
}
}
class SystemOutPrinter implements Printer {
public void print(Message message) {
System.out.println(message);
}
}
class HelloWorld {
public static void main(String[] args) {
Message message = new Message("Hello, World!");
AbstractPrinterFactory factory = AbstractPrinterFactory.getFactory();
Printer printer = factory.getPrinter();
message.print(printer);
}
}
Premature optimization of this program results in the following, which sacrifices extensibility for readability:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, jolly old fello!");
}
}
Here is the same program in C:
#include <stdio.h>
int main(void) {
puts("Hello, World!");
}
Here is the same program in C++:
#include <iostream>
int main(void) {
std::cout << "Hello, World!\n";
}
Here is the same program in Lua:
print("Hello, World!")
Here is the same program in Python and Perl:
print "Hello, World!"
Here is the same program in Ruby:
puts "Hello, World!"
Here is the same program in JavaScript:
alert("Hello World!");
Here is the same program in ASCII:
Hello, World!
Here is the same program in ROT-13:
Uryyb, jbeyq!
Here is the same program in Brainfuck:
+++++++[>++++++++++<-]>++.<+++[>+++++++++<-]>++.+++++++..+++.-<++++++[>-----------<-]>.<+++[>----<-]>.<+++++[>+++++++++++<-]>.<++++[>++++++<-]>.+++.------.--------.<++++++[>-----------<-]>-.
Here is the same program in French:
Bonjour, le monde. Vous êtes ennuyeux et non raffiné.
Here is the same program in Binary:
01001000011001010110110001101100011011110010110001000000011101110110111101110010011011000110010000100001
Here is the same program in LEGO:
Here is the same program in Morse code:
..- -... .. / -.- .... -.-. -. / ..--.- . .. .-.-. / ...-....
As you can see, these programs cannot possibly be as efficient as the above Java examples, because there isn't enough code to be efficient 'with'.
}
[edit] public class Trivia {
- Shakespeare is known to be the only human capable of turning code into coffee. Mathemagicians, such as Harry Potter during secret missions liberating France, perform the reverse function. These forces can be combined to produce 1.21 Jigga whats.
- James Gosling, the erstwhile philanthropist and grandmaster of Java, was last seen leaving his office cubicle in the company of several masked C# programmers. His current whereabouts is unknown.
}
| Programming languages |
|
Assembler - BASIC - Brainfuck - C - C Flat - C# - C=C+1 - COBOL - Delphi - Fortran - Haskell - Java - JavaScript - Lithp - LOGO - Perl - PHP - Tcl - VBScript - Visual Basic |
