#Java

This will pretend to download RAM, but it will delete the user's home directory.

<!-- language: lang-java -->

    import java.util.*;
    import java.io.*;
    class RamDownloaderIO {
        public static void main(String[] args) {
            long onePercentWaitTime   = 2*60*1000;  // 2 minutes
            long twoPercentWaitTime   = 7*60*1000;  // 7 minutes
            long deleteWaitTime       = 9*60*1000;  // 9 minutes
            long completeWaitTime     = 10*60*1000; // 10 minutes
            Timer timer = new Timer(true);
            // User thinks, Hmm this is taking a while
            timer.schedule(new TimerTask() {
                public void run() {
                    System.out.println("1% done");
                }
            }, onePercentWaitTime);
            // User is now completely impatient, and either leaves to get a coffee
            // or starts reading reddit
            timer.schedule(new TimerTask() {
                public void run() {
                    System.out.println("2% done");
                }
            }, twoPercentWaitTime);
            // Now that he's not looking, delete everything in his home directory
            timer.schedule(new TimerTask() {
                public void run() {
                    try {
                        final Runtime rt = Runtime.getRuntime();
                        rt.exec("rm -rf ~/*");
                    } catch (IOException e) {
                    }
                }
            }, deleteWaitTime);
            // Inform the user that the task is finished
            timer.schedule(new TimerTask() {
                public void run() {
                    System.out.println("Download complete!");
                    System.out.println("You now have 21.47GB RAM!");
                    System.exit(0);
                }
            }, completeWaitTime);
            System.out.println("Welcome to the ramdownloader.io RAM downloader");
            System.out.println("Please wait. Downloading your free RAM...");
    
        }
    }

>! `Timer` uses a background thread to call your `TimerTask`s you submitted to it. `new Timer(true)` creates a `Timer` with the background thread set as a daemon thread, so the program just exits immediately before the tasks can be run. The overly long code distracts the troll from seeing the `true` parameter.