this is a link to java's api http://java.sun.com/j2se/1.5.0/docs/api/ if you're not importing from the java api then just import whatever you named the package.
I have a strong suspicion though that what you really want to know do is use methods of an instance of an object to modify your current class somehow.
thx mate, yeah but i need certain information from it, like i need to take a comparison that user entered and Scan it, so i need to take only a certain ammout of info...
ya using import doesn't take information from classes it just gives you the ability to make instances of that class(or use their static methods)
it sounds like you want to do something like this
Code:
import java.util.Scanner;
public class UserInput{
public static void main(String args[]){
int userInput;
System.out.println("input information");
Scanner input = new Scanner(System.in);
userInput = input.nextInt();
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.