CSCI 1301 Exam 1 Questions 100% Solved.
Java does not directly compile into machine code. What does it do instead? - answerJava
programs are compiled into bytecode
What is needed to run a Java byte code program on a given computer? - answerA suitable Java
virtual machine, JVM, must be installed...
Which type of error (Syntax, Runtime, Logical) is the easiest to fix? - answer✔Syntax because
the Java program won't run due to syntactical errors
Which type of error is the hardest to fix? - answer✔Logical because the Java program will run as
if nothing is wrong but the output will not be desired
How many different numbers can be represented with a 4-bit number? - answer✔16
How many different numbers can be represented with a 4-byte number? - answer✔2^32 or
4294967296
List the 8 primitive data types used in Java. - answer✔Byte, short, int, long, float, double, char,
and boolean
How many bytes are used to store a boolean value? - answer✔1 byte
How many bytes are used to store a byte value? - answer✔1 byte
How many bytes are used to store a short value? - answer✔2 bytes
How many bytes are used to store a char value? - answer✔2 bytes
How many bytes are used to store a int value? - answer✔4 bytes
How many bytes are used to store a float value? - answer✔4 bytes
How many bytes are used to store a long value? - answer✔8 bytes
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller sirjoel. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R195,17. You're not tied to anything after your purchase.