Question

Java Test 1 Name 1) A Java program is best classified as arsge D) pnocesorE) aa 2) 6 bits can be used to represent 3) Binary numbers are composed entirely of ? 4) Define the main method for a Java program 5) Give 2 examples of a legal Java identifier? distinct items or values? 6) A unique aspect of Java that allows code compiled on one machine to be executed on a machine of a different hardware platform is Javas A) bytecodes B) syntax C) use of objects D) use of exception handing E) all of the above 7) An error in a program that results in the program 500 ? A)aprogrammer error B) a syntax error C)ann-time emor alogical eror EO a snafu 8 Mistyping printin as printn will result in a syntax error B) a run-tinme error C) a logical error D) no error at all E) All the above 9) What is the output of the ollowing when the main method is evecuted public class Question-4 public static void main Stringl 1 args System.out.printinhi there System.out printin System.out.printinhow areu oing today? 10) Write a Java program that will output on two separate lines the Phases Repent Jesus is coming soon and It pays to be educated public static void main( Stringl ] args) 1 1) Name five of the fundamental terms which comprehend obyect-oriented programming. 12) A Java variable is the name of a A) numeric data value stored in memory B) data value stored in memory that can not change during the programs execution C) data value stored in memory that can change its value but cannot change its type during the programs execution D) data value stored in memory that can change both its value and its type during the programs execution E) data value or a class stored in memory that can change both its value and its type during the programs execution
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) Software

2) 64 distinct items or values

3) 0's and 1's.

4) java main method is defined as

public static void main(String args[])

5) string , main

Legal identifiers are nothing but the names of classes, variables packages and interfaces etc.

6) A) Bytecodes

7) D) Logical error

8) A) a syntax error

9)

hi there

how are you doing today?  

10)

public static void main (String[] args)
{
System.out.println("Repeat Jesus is comin soon");
System.out.println("It pays to educated");
}
}

11)

Class
Object
Inheritence
Encapsulation
Polymorphism

12) C

Add a comment
Know the answer?
Add Answer to:
Java Test 1 Name 1) A Java program is best classified as arsge D) pnocesorE) aa...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Comments used to document code should: A. be used as little as possible B. be insightful...

    Comments used to document code should: A. be used as little as possible B. be insightful and explain what the instruction's intention is C. only be included in code that is difficult to understand D. be used to define variables whose names are not easy to understand E. not be included with the program 2 points    QUESTION 2 The main method for a Java program is defined by: A. public static main( ) B. public static main(String[ ] args);...

  • Write a program that will check a Java file for syntax errors. The program will ask...

    Write a program that will check a Java file for syntax errors. The program will ask for an input-file name and output-file name and will then copy all the code from the Java input file to the Java output file, but with the following changes: 1. Any syntax error found in the Java input file will be corrected: a. Missing semicolon b. Missing compound statements (curly braces) c. All comments have to start with // and end with a period....

  • Which of the following are valid array declarations? a. int[] array- new int[10]; b. double [array...

    Which of the following are valid array declarations? a. int[] array- new int[10]; b. double [array double[10]; c. charl charArray "Computer Science"; None of the above Analyze the following code: class Test public static void main(Stringl] args) System.out.println(xMethod(10); public static int xMethod(int n) System.out.println("int"); return n; public static long xMethod(long n) System.out.,println("long"); return n The program displays int followed by 10 The program displays long followed by 10. The program does not compile. None of the above. tions 3-4 are...

  • STEP 1: Type (do not copy and paste) Program 1 into a program and Program 1:...

    STEP 1: Type (do not copy and paste) Program 1 into a program and Program 1: import java.util.Scanner; public class Overflow2 [ public static void main(Stringil args) ( Scanner scan new Scanner(System.in); int[] vals new int[10]; System.out.printin( "How many values should be stored in the array? int count = scan . next Int(); for (int i-0; ǐ < count; i++) { vals[i] count-i: System.out , printin ("which value do you wish to retrieve? "İ int which = scan . next...

  • **JAVA*JAVA Question 1 How many k's values will be printed out? public static void main(Stringl args)...

    **JAVA*JAVA Question 1 How many k's values will be printed out? public static void main(Stringl args) for (int k-1: k10:k if (k8) continue: System.out.println k) Question 2 3.5 pts Analyze the following code. Which one is correct? package p public class A package p2: import p1. public class B extends Af int i- 5 private int j- 10: public A0I public static void main(Stringll args) B b new B0: System.out.println(a.i+", "+ajt", "+b.it""+bj): a.i is printable None of them b.i is...

  • Write a program in Java that prompts a user for Name and id number. and then...

    Write a program in Java that prompts a user for Name and id number. and then the program outputs students GPA MAIN import java.util.StringTokenizer; import javax.swing.JOptionPane; public class Main {    public static void main(String[] args) {                       String thedata = JOptionPane.showInputDialog(null, "Please type in Student Name. ", "Student OOP Program", JOptionPane.INFORMATION_MESSAGE);        String name = thedata;        Student pupil = new Student(name);                   //add code here       ...

  • 1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program!...

    1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program! 3     public static void main(String[] args) { 4         System.out.println("Hello, World!"); 5     } 6 } What is on line 1? a. a variable declaration b. a statement c. a method (subroutine) definition d. a comment e. a class definition 2) Which one of the following does NOT describe an array? a. It can be used in a for-each loop. b. It has a numbered sequence...

  • Write in Java Implement the parse method and test it by calling with three different strings...

    Write in Java Implement the parse method and test it by calling with three different strings and by printing the results. The Scanner method can be used to read values from strings, files, or System.in. We need to invoke the useDelimiter method to define what symbols can separate, or terminate, the digits of a Fraction. public static Fraction parse(String input) t Scanner s new Scanner(input) useDelimitercTVMitln"); int num s.nextlnt() int denom s.nextlnt); s.close): return new Fraction(num, denom) class Codechef static...

  • Prelab Exercises Your task is to write a Java program that will print out the following...

    Prelab Exercises Your task is to write a Java program that will print out the following message (including the row of equal marks): Computer Science, Yes!!!! ========================= An outline of the program is below. Complete it as follows: a. In the documentation at the top, fill in the name of the file the program would be saved in and a brief description of what the program does. b. Add the code for the main method to do the printing. //...

  • Predict the output of following Java program class T { int t= 20; T() { t...

    Predict the output of following Java program class T { int t= 20; T() { t = 40 } } class Main { public static void main(String args[]) {    T t1 = new T();    System.out.println(t1.t); } } a.20 b.Garbage value c.40 d.Compiler Error

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT