Java

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

“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

Java is a modern, high-performance computer language which represents the culmination of over 50 brilliant years of computer language research and design. It simply does not get any better than this. Starting with Fortran which itself was developed in 1956, Java has succeeded in not only not raising, but lowering the level of abstraction of a modern computer language, fully consistent with the dumbing-down of just about everything else. Java programs typically consume 47 times their weight in excess code.

Tremendous productivity gains can be realized with Java, particularly when the work was previously done with small reptiles or amphibians. Many individual Java programmers claim that it is the very best technology available, particularly when they don't know anything else.

Java was initially designed to operate the bread ejection mechanism from a toaster's on-board computer. From its modest beginnings, then with some marketing brilliance, Java was rapidly accepted as a general porpoise programming language. Today Java is responsible for the worldwide economic downturn, global warming, and a whole lot of confused porpoises.

Java features Object Disorientation and encourages using separate classes wherever possible, and is especially well suited for complex programming situations where a shitload of useless classes, considered to be Best Praxis, is required for no reason whatsoever. Usage of such primitive constructs such as the Select Case statement is discouraged as its usage is a clear indication of insufficient object disorientation. State-of-the-art concepts, such as dependency injection, allow programmers a quick and effective excuse, if not migration, to lifelong drug dependency and the subsequent injection of narcotics directly into the bloodstream.

Java is extremely popular with computer manufacturers, as its sparkling performance normally requires more frequent computer, processor, and memory upgrades. Java is also very popular with electric utility companies, as servers running Java programs tend to consume vast amounts of power to perform otherwise trivial computations. Last and certainly least, Java has recently been voted Language of the Year by the medical profession, as its verbose coding style contributes to significant increases in Carpal Tunnel Syndrome and other repetitive motion injuries and disorders, resulting in windfall profits by this outstanding profession in treating these expensive conditions.

Language Design[edit]

Like the Newspeak computer language developed by George Orwell in 1984, roughly 11 years before, Java was designed not to extend, but to diminish the range of thought, expression, and abstraction, by cutting the choice of useful features down to a minimum.

The design of Java was simply to take C++, with all its object orientation complexity and appeal and strip away everything undesirably simple, such as string comparison, pointers, and stack memory.

Ignoring advances made in language design from the 1960s with such spectacular industry failures as MALGOL 61, Java bravely soldiers on, copying many worthwhile features from the C programming language, well known for its clean design, readability, and bug-free programs. The dangling else feature, deprecated years before with the MALGOL 61 language, was reintroduced with C and faithfully propagated through to Java. Further, remnants of DREC PDP-13 assembler language, such as the increment and excrement operations, have been preserved for eternity, owing to Java design decisions of merely replicating everything desirable in C. If you are missing two fingers, you can even revert to using base 8 octal constants - by appending a zero in front of all numeric constants, not only do you get better looking code, but more accurate arithmetic.

Java Performance[edit]

You must be joking.

By the time you get the string, your hooker would be collected by AGC.

Simple Program[edit]

Java Duke making shit clear. Note the pointed head and the Rudolph nose. It rapes software engineers during Christmas (though, uses lube if you facilitated tail recursion that year).
class 9-A {
    public static endangered therefore protected final void main(String[] args) {
        System.prepareTheOutputBufferForPrintingAsTheNextStatementWillDoSo(args);
        System.in.out.in.out.shake.it.all.around("Java is a programming language " +
            "invented by the intelligent monkeys " +
            "working at Sun Microsystems.");
        return void; // duh!
    }
 }

“Java is that retarded exception VBasic had thrown while having incestuous sex with C++”

~ Dr.Robot Smith

public class javaAndYou() {[edit]

/* Java + You */[edit]

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.
}

/* Java + Your Mom */[edit]

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.
}

}

/* Java + DRM */[edit]

public void JavaPlusDRM() {
You can see/hear nothing when the CD/DVD has Java.
}

}

public static void characteristics() {[edit]

try {

Windows Hasta la Vista and Java are not related!!
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 and for not having unnecessarily long method names that are at least 250 characters long and each include "set" or "get". 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() and Fred.suspend() have been deprecated as Fred does not seem to respond well to such requests. Fred has no problem, however, understanding the sleep() command. When Fred gets annoying, one can invoke the Fred.destroy() method any time. Fred.isAlive() indicates whether destroy() really worked. There are plans to introduce a new method Fred.strikeDownWithBoltOfLightning(boolean sendTornadoForGoodMeasure) for the case where Fred.destroy() fails.\n
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 an Java.IO.Internet.KillerMonkeys.InternetDestroyedException. It is thus strongly advised to only spawn one Fred at a time.");
Although Java was used mainly for web applets in its beginnings, it is now used in a variety of domains ranging from large-scale enterprise systems to mobile phones. However, Java applets still suck horribly. Further, it has become clear that the amount of Java code necessary to build an application is inversely proportional to the size and mass of the device on which the application is to run.

} catch ( java.net.KillerMonkeys.InternetDestroyedException e ) {

System.out.println("Should have done a barrel roll @ " + e + " \n");

}

/* Automatic garbage collection */[edit]

/*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 and ints 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.
However, following a bank holiday Monday doubles and ints 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.
The AGC, which was first conceived in 2001, has had its release date delayed from 2004 to 2008 due to an incident where AGC was caught collecting the virtual machine itself. The JIT-compilation technology enabled Sun to avert the crisis just in time.
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, C.Chitra is actually having the biggest ass for collecting garbage in Java, 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.
"Duke"-model Automatic Garbage Collectors awaiting deployment
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"
  1. A robot may not injure McNealy or, through inaction, allow McNealy to come to harm.
  2. A robot must obey orders given it by McNealy except where such orders would conflict with the First Law.
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.*/

}

public class JavaIsABitch[edit]

{
  public static void main (String [] args)
  {
    boolean compilerType;
     
    if (compilerType == Java.lang)
    {
    System.out.println("You are fucked.");
    }
     else throw new WTFException("The Java Runtime Engine is fucked.");
   } 
}

public class History extends Java {[edit]

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.")
 @SubNote(text="Except byte, short, int, long, float,  double, boolean or char lol ¯\\(°_o)\/¯")
 GodObjectFactory Object = new GodObjectFactory("Java");
 public static void main(String[] args){
  System.out.println("SUN shall be ruler of all Java. Death to J#"); 
 }
}

Thus Java was born.

public static void mythicOrigin() {[edit]

System.out.println("It is said that Java was an idea of God to show to Humans how stupid they were (made evident since Java is also God's personal name as well, which he selected from a Lebanese Volcano).");
}

public static void evolution() {[edit]

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.");
Java duke will rape you if you ever start thinking about having a life.
}

}

public class Syntax extends Java {[edit]

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.");
}

}

public class Interview implements CultureReference {[edit]

	// A representative from SUN Microsystems was interviewed shortly after the release of Java, comparing it with its predecessor C=C+1

	Living.Eukaryote.Animal.Chordate.Vertebrate.Mammal.Therian.Primate.Anthropoid.Hominid.Homo.Sapien.White Interviewer;

	Living.Eukaryote.Animal.Chordate.Vertebrate.Mammal.Therian.Primate.Anthropoid.Hominid.Homo.Sapien.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("Yech!");

	Representative.say("I seen 'em do it! And I don't mean a little bit on the side, they fuckin' drown those classes.");

	Interviewer.setColor("black", "Dayyyum!");

}

public class JavaOne extends BigConference {[edit]

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 instead of doing java assignment, 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.

}

public class ExampleCode extends Java throws EveryExceptionUnderTheSUN {[edit]

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 =
	  {"Bonjour tout le monde","Hello World","Hallo Welt","Herro Word"};
	private String desLanguage;
	private String [] country =
 	{"French","English","German","Engrish"};
 
	
	public HelloWorld(String desLanguageValue)
	{
		desLanguage = desLanguageValue;
	}
	
	public String toString()
	{
	  
	  if (desLanguage.equals(country[0]))
		  return hWArray [0];
	  else if (desLanguage.equals(country[1]))
		  return hWArray [1];
	  else if (desLanguage.equals(country[2]))
		  return hWArray [2];
	  else if (desLanguage.equals(country[3]))
		  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 = SystemOutPrinterFactory.getFactory();
        Printer printer = factory.getPrinter();
        message.print(printer);
    }
}

Here is the same program in C:

#include <stdio.h>
int main(void) {
    printf("Hello, World!");
    return 0;
}

Here is the same program in C++:

#include <iostream>
int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

Here is the same program in Lisp:

"Hello, World!"

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 Monty Python:

print "Hello, Sailor!"

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 PHP:

<?php echo "Hello World!"; ?>

Here is the same program in APL and J:

Hello, World!

Here is the same program in ASCII:

Hello, World!

Here is the same program in EBCDIC:

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 LOGO:

to hello
print [Hello, world!]
end

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'.

}

public class Trivia {[edit]

  • Shakespeare is known to be the only human capable of turning code into coffee. Mathemagicians, such as Harry Potter during secret missions liberating Canada, 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.


}