Developer community
+1 vote
4.3k views
asked by Sr Member (4.8k points) 10 26 32 | 4.3k views

1 Answer

0 votes
This class is introduce java 1.5 version and it can be used to Read the contents from a resource.

import java.io.*;

import java.util.*;

class Read{

public static void main(String[] args) throws IOException{

Scanner s = new Scanner(System.in);

System.out.println(“Enter your age:”);

String str = s.nextLine();

Int age = Integer.parseInt(str);

System.out.println(“Age:” + age);

            }

}
answered by Expert (15k points) 15 23 32

Related questions

0 votes
1 answer
asked by sunny Expert (11.4k points) 16 23 32 | 29 views
0 votes
1 answer
asked by augustaina Sr Member (4.8k points) 10 26 32 | 106 views
0 votes
1 answer
asked by taye Sr Member (5k points) 7 10 12 | 61 views
0 votes
1 answer
asked by sara Guru (24.6k points) 31 57 92 | 39 views
0 votes
1 answer
asked by sara Guru (24.6k points) 31 57 92 | 61 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,754 questions
4,046 answers
117 comments
10,709 users