English

Primitive data types are built in data types which are a part of the wrapper classes. These wrapper classes are encapsulated in the java.lang package. Non primitive datatypes like Scanner class are a - Computer Applications

Advertisements
Advertisements

Question

Primitive data types are built in data types which are a part of the wrapper classes. These wrapper classes are encapsulated in the java.lang package. Non primitive datatypes like Scanner class are a part of the utility package for which an object needs to be created.

  1. To which package the Character and Boolean classes belong?
  2. Write the statement to access the Scanner class in the program.
One Line Answer

Solution

  1. java.lang
  2. Scanner sc=new Scanner(System.in);
shaalaa.com
Data Types
  Is there an error in this question or solution?
2023-2024 (February) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×