How to use scanner in java?
import java.util.Scanner;
class classname{
public methodname(){
//Scanner declaration
Scanner s_name = new Scanner(System.in);
//Use Scanner to take input
int val = s_name.nextInt();
}
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? * *** ***** ******* Like this
What is the implementation of destroy method in java. Is it native or java code?
What are the differences between heap and stack memory?
what is a green thread? : Java thread
What is the difference between parameters and arguments ?
what is meta-Inf?
explain what is transient variable in java?
Which method must be implemented by all threads?
What is the use join() in Threads ?
What is multithreading and its advantages?
What is reverse function?
Can we make a constructor final?