100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CS 109 BULIT IN DATA TYPES FOR PROGRAMMING CORRECT 100%

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
16-05-2025
Written in
2024/2025

The relational operators || and && (OR and AND) are called _____ operators 1.Empty 2.Divisional 3.Boolean 4.Binary - ANSWER Boolean Explanation They are called Boolean because they test for a true/false condition. However, all relational operators are basically used to check if a condition is true. Is the pay rate less than 50? If it is (true), then do some processing. Still, we call the AND and OR operators Boolean to separate them from the other operators. Which data type is 1-bit in size? an - ANSWER 1. Boolean Explanation Data type boolean is 1-bit in size and it holds value true or false. The default is false. What kind of data type will you use for

Show more Read less
Institution
CS 109
Course
CS 109









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS 109
Course
CS 109

Document information

Uploaded on
May 16, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS 109 BULIT IN DATA TYPES FOR
PROGRAMMING CORRECT 100%
The relational operators || and && (OR and AND) are called _____ operators
1.Empty
2.Divisional
3.Boolean
4.Binary - ANSWER Boolean
Explanation
They are called Boolean because they test for a true/false condition. However, all
relational operators are basically used to check if a condition is true. Is the pay rate less
than 50? If it is (true), then do some processing. Still, we call the AND and OR operators
Boolean to separate them from the other operators.

Which data type is 1-bit in size?
1.boolean
2.long
3.char
4.short - ANSWER 1. Boolean
Explanation
Data type boolean is 1-bit in size and it holds value true or false. The default is false.

What kind of data type will you use for an object 'Pen'?
1. int
2.char
3.long
4.class - ANSWER class class class class class class class class class class class
class class class class class class class
Explanation
A class is a user-defined data type. Hence 'class' is the correct answer.

Which of the following is a double in Java?
1. x = 0.123456789123456789123;
2. x = 5f;
3. x = 1.234567891234567;
4.x = 0. 0.12345f; - ANSWER 3. x = 1.234567891234567;
Explanation
A double in Java can store a maximum of 16 digits after the decimal. So if there are
more than 16 digits, Java will show an error. When f is appended to the decimal value
the data is stored as a float, not a double.

Which of the following is an example of a floating point data type in Java?
1. x = -4.56899f;
2. x = 2.3;

, 3. x = 4/0;
4. x = -0.1; - ANSWER x= -4.56899f;
Floating point data types in Java are represented by appending the letter f to the end of
the decimal. If the letter f is not appended, Java considers the number as a double.
Floating point data types in Java are represented by appending the letter f to the end of
the decimal. If the letter f is not appended, Java considers the number as a double.
Floating point data types in Java are represented by appending the letter f to the end of
the decimal. If the letter f is not appended, Java considers the number as a double.

Java constants are usually named with upper case letters with an underscore between
words. However, which of the following would also compile as the name for a constant?
1. Last Name
2. If Else
3. ifElse
4. If - ANSWER ifElse. ifElse. ifElse. ifElse. ifElse. ifElse. ifElse. ifElse. ifElse. ifElse.


int myNumber;
What is the value of myNumber in the following code?
0
NULL
Undefined
-1 - ANSWER zero. zero. zero. zero. zero. zero. zero. zero. zero. zero.
Explanation
Remember that the default value for short, int, or long is 0.

Which of the following is included in a Java API?
1. Encryption
2. JavaScript plug-ins
3 Classes and methods
4. USB Connector - ANSWER Classes and methods. Classes and methods. Classes
and methods. Classes and methods. Classes and methods. Classes and methods.
Classes and methods. Classes and methods. Classes and methods. Classes and
methods.
Explanation
An API is a package: Included within the package are interfaces and classes, each with
methods, fields and constructors.

Which of the following correctly imports only the FileFilter interface of the java.io API?
1. import java.FileFilter.*;
2. import java.io.*;
3. import java.*.FileFilter;
4. import java.io.FileFilter; - ANSWER 4. import java.io.FileFilter;
import java.io.FileFilter; import java.io.FileFilter; import java.io.FileFilter; import
java.io.FileFilter; import java.io.FileFilter; import java.io.FileFilter; import
CA$21.26
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
shantelleG West Virgina University
Follow You need to be logged in order to follow users or courses
Sold
605
Member since
2 year
Number of followers
368
Documents
17833
Last sold
3 days ago
GOLD PREMIUM

HELLO? welcome to my store thanks for visiting this page here you are guaranteed of well revised and assured EXAMS ALL GRADED A+ thus making your education journey easy and seamless . DO NOT HESITATE TO CONTACT ME IF YOU ARE IN NEED OF ANY EXAM .I AM READY 24/7 TO ASSIST YOU ALSO REFER YOUR FRIENDS.

4.1

114 reviews

5
69
4
10
3
21
2
2
1
12

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions