i tried it both way by using Scanner and BufferedReader but it doesnt work
i've got following error
java.lang.NumberFormatException:
Solution.java, method main, line: 17
Error converting a string to a number (invalid format).
plz help me how to solve
package com.codegym.task.task03.task0318;
/*
Plan to conquer the world
*/
import java.io.*;
//import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String number = br.readLine();
int num = Integer.parseInt(number);
String name = br.readLine();
// Scanner sc = new Scanner(System.in);
// int num = sc.nextInt();
// String name = sc.nextLine();
// System.out.println(name + " will take over the world in " + num + " years. Mwa-ha-ha!");
}
}