My code compiled well but why cant i get the last requirement right?
package com.codegym.task.task03.task0318;
/*
Plan to conquer the world
*/
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Solution {
public static void display (int years, String name) {
System.out.println(name + " will take over the world in " + years + " years. Mwa-ha-ha!");
}
public static void main(String[] args) throws Exception {
//write your code here
InputStreamReader r = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(r);
System.out.println("Enter years");
String input = reader.readLine();
int years = Integer.parseInt(input);
System.out.println("Enter your name");
String name = reader.readLine();
display (years, name);
}
}