100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC 1350 Final Exam Question and answers rated A+ 2024 $14.49   Add to cart

Exam (elaborations)

CSC 1350 Final Exam Question and answers rated A+ 2024

 8 views  0 purchase
  • Course
  • Csc
  • Institution
  • Csc

CSC 1350 Final Exam Question and answers rated A+ 2024 CSC 1350 Final Exam (Comprehensive) Who writes the the source code(program), which is a .java file(s)? - correct answer The programmer What does Java run on? - correct answer Java runs on a target machine, it runs on the java virtua...

[Show more]

Preview 4 out of 120  pages

  • September 3, 2024
  • 120
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Csc
  • Csc
avatar-seller
flyhigher329
CSC 1350 Final Exam (Comprehensive)
Who writes the the source code(program), which is a .java file(s)? - correct
answer ✔The programmer


What does Java run on? - correct answer ✔Java runs on a target machine, it
runs on the java virtual machine (JVM)


what creates a byte code file (.class)? - correct answer ✔The Java compiler
creates a bytecode file (.class), this is an object file the JVM can run


What is the object code? - correct answer ✔The .class file is object code,
object code is a program that the computer understands


T/F: Java can run on any machine with a Java interpreter? - correct answer
✔true


T/F: In Java, every source file can contain at most one public class - correct
answer ✔True


T/F:The name of the public class must match the name of the file containing
the class - correct answer ✔True


How would you write a main method (which is required for every program)? -
correct answer ✔public static void main (String[] args) {
}


T/F: When the application begins, the instructions, called statements, in the
"main" method are executed - correct answer ✔True

,What is a statement? - correct answer ✔an executable instruction that tells
the compiler what to perform


Statements are executed how many times? - correct answer ✔one by one


What is at the end of a statement? - correct answer ✔;


T/F:Every expression and statements must end with a semicolon ";" - correct
answer ✔true


T/F:"{" and "}" must come in pairs, they mark a block of code - correct answer
✔true


What is the first programs all programmers will write? - correct answer
✔HelloWorld




public class HelloWorld
{ public static void main(String[] args) { System.out.println("Hello World"); } }


how to print without a new line? - correct answer ✔System.out.print


how to print while adding a new line? - correct answer ✔System.out.println


how to print while adding formatting? - correct answer ✔System.out.printf

,How would you write Hello World - correct answer ✔public class HelloWorld
{ public static void main(String[] args) { System.out.print("Hello");
System.out.print(" World ");
}
}


How would you write
Hello
World - correct answer ✔public class HelloWorld {


public static void main(String[] args) { System.out.println("Hello");
System.out.println(" World ");
}
}


What are comments? - correct answer ✔A way for you to leave notes about
what your code is doing in plain English, so other people can understand it.


what does // do in a comment (single line)? - correct answer ✔Single line
comments are denoted with double forward slashes //text that will not run


what does // do in a comment (Multi-line)? - correct answer ✔Multi-line/block
comments are denoted by a forward slash and an asterick
/*multi-line comment*/


T/F: Javadoc comments can be exported to an html document - correct
answer ✔true

, Standard input or STDIO - correct answer ✔-Standard input provides a way
to give information to the machine
-Input is often done through a keyboard


Standard output - correct answer ✔-Standard output provides a way to give
information back to a user
-Output is often provided and observed through a monitor


How would you use standard in/output in java? - correct answer ✔1. Use of
standard in/out requires importing a library in Java
2. This library is a collection of code that enables streaming data in and out
3.The statement import Java.util.Scanner will often appear in Java code to
import this library and use the standard in and out streams
4. To take input you must declare a Scanner object


How do you declare a scanner object to take user input? - correct answer
✔Scanner in = new Scanner(System.in)


What are the methods to take in different types of data? - correct answer
✔in.next
in.nextLine


in.next - correct answer ✔takes input until a space


in.nextLine - correct answer ✔takes input until a newline ("\n")


What are Compile errors? - correct answer ✔-are errors in code that prohibit
the compiler from completing the compilation process

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

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 these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller flyhigher329. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

66579 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.49
  • (0)
  Add to cart