STD-12 Computer Textbook Solution CH-07 Java Basics
1. How many basic (primitive) data types are supported in Java?
a. 2
b. 4
c. 8
d. 16
2. What is the default data type of floating point literal?
a. int
b. long
c. float
d. double
3. Which character set is used for char data type in Java?
a. Unicode
b. ASCII
c. EBCIDIC
d. All of these
4. Which of the following is compiled error free?
a. for (;;) {int i=7}
b. while (1) {int i=7}
c. while (True) {int i = 7}
d. All of these
5. Which of the following is not allowed as first character in valid variable name?
a. Underscore (_)
b. Digit
c. Letter
d. Dollar ($)
6. Which of the following is not a basic data type in Java?
a. char
b. long
c. byte
d. String
7. What is the default value of Boolean type data?
a. null
b. true
c. false
d. 0
8. What will be the result of arithmetic expression 7/2?
a. 3
b. 3.5
c. 1
d. 0
9. What will be the result of arithmetic expression –7%2 ?
a. –3
b. –1
c. 1
d. –3.5
10. What will be the result of arithmetic expression –7.5%2 ?
a. –3
b. –1.5
c. 1.5
d. Error
If you want to work as a web developer, the most obvious reason to learn JavaScript is because you'll need it. Even if you don't want to work in IT, knowing this language will allow you to create websites from the ground up, which is a valuable skill in today's job market (Nextstacks).
ReplyDelete