B. State True or False:
1. Polymorphism allows a function to behave differently for different objects.
Constants mean the fixed values that do not change during the execution of a program.
3. The main() function indicates that the execution of the Java program will begin from this point.
4
Even)
Every Java statement must end with a colon.
Inheritance is a feature using which an object in one class acquires the properties of another class.
6. While comparing two variables, their data types should not be the same.
Answers
1. true
2. true
3. true
4. false
5. true
6. false
Answer:
1) Polymorphism allows a function to behave differently for different objects.
True
Polymorphism: “many forms”
2) Constants mean the fixed values that do not change during the execution of a program.
True
3) The main() function indicates that the execution of the Java program will begin from this point.
True
4) Every Java statement must end with a colon.
False
Correct statement: Most, but not all, Java statements must end with a semicolon.
5) Inheritance is a feature using which an object in one class acquires the properties of another class.
True
6) While comparing two variables, their data types should not be the same.
False
Correct statement: While comparing two variables, their data types should be the same.