Ques 1 Datatype
Which of the following is not a Primitive datatype in Java?
a) byte
b) String
c) float
d) double
Ques 2 Datatype
Ashish is writing a class to handle student details. It requires two important variables student_name and student_mobileNumber. For name, he has taken that datatype as String. For student_MobileNumber what should be the data type?
a) short
b) float
c) char
d) long
Ques 3 Datatype
What is the default initial value of boolean datatypes?
a) true
b) false
c) 0
d) 1
Ques 4 Datatype
Consider the following code,
class student { int studName; public void NewStudent(int studentid,String StudentName) { String studName; studName=StudentName; //Line 1 } }In Line 1. What is the scope of the variable "studName" ?