Write down the syntax with reference to Java Programming:
to accept a line of text
1 Like
//Input through InputStreamReader Class InputStreamReader read = new InputStreamReader(System.in); BufferedReader in = new BufferedReader(read); String str = in.readLine();
//Input through Scanner Class Scanner in = new Scanner(System.in); String str = in.nextLine();
Answered By
to accept an integral value
to accept a fractional number
Explain the use of Math.ceil() mathematical function
Explain the use of Math.rint() mathematical function