INPUT IN JAVA
o What is data entry?
. What are the 3 main forms of inputting data into java programs?
, How may classes be effective?
. How do Java packages help in resolving naming conflicts?
, Name the most common built-in Java packages.
o What are sub-packages?
. Explain the purposes of following Java sub-packages: *java.lang *java.util
*java.io *java.awt *java.net *java.applet
, How are packages in Java organised?
, State the complete name of the Scanner class in Java.
. Explain the usage of import statement provided by Java.
. State the syntax of importing class and packages into Java.
. State any 4 advantages of using packages in Java.
. Explain about input using initialisation in Java. When do you decide the variable
values in this method? What is it also called?
. What is the main drawback of hard-coded values of input?
. Explain how parameters are used to provide input in java. How are values decided?
, When was the Scanner class introduced in Java?
. Explain how the Scanner class reads values.
, Where must the import statement of the Scanner class be placed?
. What is a stream in terms of computers?
, What is the special stream that the keyboard uses for inputting data? How do we
obtain output from this?
, What is the standard input and output streams in java?
. Explain the functioning of the Scanner class.
. State the use of following methods of Java: *next() *nextLine() *nextShort()
*nextInt() *nextLong() *nextFloat() *nextDouble() *next().charAt(0)
. State the use of following methods: *hasNext() *hasNextLine() *hasNextShort()
*hasNextInt() *hasNextLong() *hasNextFloat()
o What are errors? Define errors and debugging.
, What are the major kinds of errors in java programs?
. Explain why the following types of errors occur: *Syntax errors *Runtime errors
*Logical errors
, State few examples of following errors: *syntax *runtime *logical
. Why are syntax errors also called as compile-time errors?
. Why do logical errors commonly occur?