What are the wrapper classes ?
What is the difference between scanner class and wrapper class ?
100 points .
Answers
Answered by
1
wrapper class I guess wrapps a primitive data type and scanner class is meant for input from users
Answered by
2
Wrapper Class
• A Wrapper class is a class whose object wraps or contains a primitive data types.
• When we create an object to a wrapper class, it contains a field and in this field, we can store a primitive data types.
• In other words, we can wrap a primitive value into a wrapper class object.
Scanner Class
• Scanner class is a simple text scanner which can parse primitive types and strings using regular expressions.
•Following are the important points about Scanner :−
A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace.
Similar questions