Question

Java is one of the most popular programming languages in the world. Name 3 characteristics that...

  1. Java is one of the most popular programming languages in the world. Name 3 characteristics that are unique to this programming language and contribute to its popularity.

  1. Once the requirements are understood name each step, a Java Project must go through before you can execute the code on a computer.

  1. There are 3 types of errors that you can encounter as a Java programmer. Syntax Errors, Runtime Errors, and Logic Errors. Explain what each of these errors mean and give an example for each.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please do like, If you are impressed with the answer

Answer:

Major Characteristics of Java programming language :

  • Object Oriented: In Java, everything is an Object. Java can be easily extended since it is based on the Object model.
  • Platform Independent: Unlike many other programming languages including C and C++, when Java is compiled, it is not compiled into platform specific machine, rather into platform-independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever platform it is being run on.
  • Multithreaded: With Java's multithreaded feature it is possible to write programs that can perform many tasks simultaneously. This design feature allows the developers to construct interactive applications that can run smoothly.
  • Dynamic: Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run-time information that can be used to verify and resolve accesses to objects at run-time.

Three types of errors that you can encounter as a Java programmer:

Syntax Errors: A syntactical error in Java code is one in which the language you use to create your code is incorrect. For example, if you try to create an if statement that doesn’t include the condition in parentheses, even when the condition is present on the same line as the if statement, that’s a syntax error.

Example:

public class syntaxError {
   public static void main(String args[]) {
    system.out.print("Syntax error") // syntax error is generated because of small 's' in system.out.print and no semi colon at the end of the statement

}

}

Runtime Errors: A Runtime error is a program error that occurs while the program is running. The term is often used in contrast to other types of program errors, such as syntax error and compile time errors. There are many different types of runtime errors

Example:

Common examples include dividing by zero, referencing missing files, calling invalid functions, or not handling certain input correctly. NOTE: Runtime errors are commonly called referred to as "bugs," and are often found during the debugging process, before the software is released.

public class runtimeError{
   public static void main(String args[]){
   int i=9;
   System.out.print("Runtime error");
   System.out.print(i/0);// runtime error is generated because of no semi colon at the end of the statement
   }
}

Logic Error: logic error, or bug, is when your program compiles and runs, but does the wrong thing. The Java system, of course, has no idea what your program is supposed to do, so it provides no additional information to help you find the error

Example :

The logical error in the below code is due to using incorrect operator precedence 
public class logicError
{
   public static void main(String[] args)
   {
      // Create some variables.
      int MyVar1 = 5 + 4 * 3 / 2;
      int MyVar2 = (5 + 4) * 3 / 2;
      int MyVar3 = (5 + 4) * (3 / 2);
      int MyVar4 = (5 + (4 * 3)) / 2;
      // Output the result.
      System.out.println(
            "MyVar1: " + MyVar1 +
            "nMyVar2: " + MyVar2 +
            "nMyVar3: " + MyVar3 +
            "nMyVar4: " + MyVar4);
   }
}
Add a comment
Know the answer?
Add Answer to:
Java is one of the most popular programming languages in the world. Name 3 characteristics that...
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
  • For your initial posting pick one of the popular computer programming languages (e.g. Java, C, C++,...

    For your initial posting pick one of the popular computer programming languages (e.g. Java, C, C++, C#, Python, Ruby, etc.), determine the name of one of the function libraries that is provided by this programming language. List and describe at least 3 of the library functions in this library. Describe how this library is included in the source code for a program in this language so that to use a function only the function's name need to be mentioned.

  • 2-Many programming languages facilitate programming in more than one paradigm. TRUE OR FALSE 3-If a language...

    2-Many programming languages facilitate programming in more than one paradigm. TRUE OR FALSE 3-If a language is purposely designed to allow programming in many paradigms is called a _______________ language. What term goes in the blank? A: compiled B: interpreted C: multi-access D: multi-paradigm E: procedural 4-A "Hello, World!" program is used to do which of the following? A: Configure the compiler cache for optimizing results. B: Illustrate the basic syntax of a programming language and often is the very...

  • Name Final Exam CSC 175 (Intermediate Computer Programming) Dr. David Chays May 14, 2019 You may use your own class notes, the textbook or any standard Java language reference book for this exam....

    Name Final Exam CSC 175 (Intermediate Computer Programming) Dr. David Chays May 14, 2019 You may use your own class notes, the textbook or any standard Java language reference book for this exam. Total points for this exam are 100. Problem 1 (15 pts) For a game, you are designing a World that has a collection of players. There are two kinds of players: Superhero and Jedi (i.e. a Superhero is a Player, and a Jedi is a Player) Each...

  • Please use Java to solve this problem Problem Cases Output 05m 465 The current selected programming...

    Please use Java to solve this problem Problem Cases Output 05m 465 The current selected programming language is Java. We emphasize the submission of a fully working code over partially correct but efficient code. Once submitted, you cannot review this problem again. You can use System.out.printin to debug your code. The System.out.printin) may not work in case of syntax/runtime error. The version of JDK being used is 1.8 Amazon Fresh trucks can hold two containers on each shelf, provided the...

  • Can you solve this proble by using C# application? C# is one of programming languages supported...

    Can you solve this proble by using C# application? C# is one of programming languages supported by Visual Studio 2015. It combines the features of Java and C ++ and is suitbale for rapid application development. A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected. The state sales tax rate is 4% and the county sales tax rate is 2%. Create an...

  • The purpose of this assignment is to develop solutions that perform File IO and objects. Problem specifications are shown below with my changes in blue. 1. File Previewer Write a program that asks...

    The purpose of this assignment is to develop solutions that perform File IO and objects. Problem specifications are shown below with my changes in blue. 1. File Previewer Write a program that asks the user for the name of a text file. The program should display the first 10 lines of the file on the screen. If the file has fewer than 10 lines, the entire file should be displayed along with a message indicating the entire file has been...

  • CS 2050 – Programming Project # 1 Due Date: Session 3 (that is, in one week!)....

    CS 2050 – Programming Project # 1 Due Date: Session 3 (that is, in one week!). Can be resubmitted up to two times until Session 6 if your first version is submitted by session 3. In this project, you create two classes for tracking students. One class is the Student class that holds student data; the other is the GradeItem class that holds data about grades that students earned in various courses. Note: the next three projects build on this...

  • I need help with my programming assignment. The language used should be java and the algorithm...

    I need help with my programming assignment. The language used should be java and the algorithm should use search trees so that you play against the computer and he chooses the best move. The tree should have all possibilities on the leaves and you could use recursion to so that it populates itself. The game can be a 3*3 board (no need the make it n*n). Please put comments so that I can understand it. Thanks The game of ‘Walls’...

  • CSC151 JAVA PROGRAMMING LAB #7 OBJECTIVES . . . In this lab assignment, students will learn:...

    CSC151 JAVA PROGRAMMING LAB #7 OBJECTIVES . . . In this lab assignment, students will learn: To get an overview of exceptions and exception handling • To explore the advantages of using exception handling • To declare exceptions in a method header • To throw exceptions in a method • To write a try-catch block to handle exceptions To develop applications with exception handling To use the finally clause in a try-catch block To write data to a file using...

  • 1. (p. 2-3.) Which of the following is NOT a reason for studying concepts of programming...

    1. (p. 2-3.) Which of the following is NOT a reason for studying concepts of programming languages according to Sebesta? a. Increased capacity to express ideas. b. Improved background for choosing appropriate languages. c. Increased ability to design new languages. d. Increased ability to learn new languages. 2. (p. 5-6.) What programming language has dominated scientific computing over the past 50 years? a. FORTRAN b. ALGOL c. SNOBOL d. PL/I 3. (p. 6.) What programming language has dominated artificial intelligence...

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