0% found this document useful (0 votes)
31 views1 page

Input in Java

The document discusses various aspects of data entry in Java, including input methods, the effectiveness of classes, and the role of packages in resolving naming conflicts. It covers the Scanner class, its usage, and methods for reading input, as well as the types of errors in Java programming and their definitions. Additionally, it explains the organization of packages, the concept of streams, and the advantages of using packages.

Uploaded by

vidush673
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

Input in Java

The document discusses various aspects of data entry in Java, including input methods, the effectiveness of classes, and the role of packages in resolving naming conflicts. It covers the Scanner class, its usage, and methods for reading input, as well as the types of errors in Java programming and their definitions. Additionally, it explains the organization of packages, the concept of streams, and the advantages of using packages.

Uploaded by

vidush673
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

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?

You might also like