![]() ![]() Language features that help make Java robust include declarations, duplicate type checking at compile time and runtime (to prevent version mismatch problems), true arrays with automatic bounds checking, and the omission of pointers. Java programs must be reliable because they are used in both consumer and mission-critical applications, ranging from Blu-ray players to vehicle-navigation or air-control systems. Interpretation also makes it possible to delay the link step between the pieces of a Java program until runtime, which speeds up development. Interpretation makes it easier to debug faulty Java programs because more compile-time information is available at runtime. The virtual machine then executes those platform-specific instructions. Interpretation is the act of figuring out what a bytecode instruction means and then choosing equivalent "canned" platform-specific instructions to execute. The virtual machine translates the Java program's bytecodes (instructions and associated data) to platform-specific instructions through interpretation. At runtime, a Java program indirectly executes on the underlying platform (like Windows or Linux) via a virtual machine (which is a software representation of a hypothetical platform) and the associated execution environment. Furthermore, Java programs can access objects across a TCP/IP network, via Uniform Resource Locators (URLs), with the same ease as you would have accessing them from the local file system. Java's extensive network library makes it easy to cope with Transmission Control Protocol/Internet Protocol (TCP/IP) network protocols like HTTP (HyperText Transfer Protocol) and FTP (File Transfer Protocol), and simplifies the task of making network connections. As an example, whereas Java lets you focus on savings account objects, C requires you to think separately about savings account state (such a balance) and behaviors (such as deposit and withdrawal). This is different from a structured language like C. Java's object-oriented focus lets developers work on adapting Java to solve a problem, rather than forcing us to manipulate the problem to meet language constraints. A feature not mandated in C/C++, but essential to Java, is a garbage-collection facility that automatically reclaims objects and arrays. Pointers, multiple implementation inheritance, and operator overloading are some C/C++ features that are not part of Java. ![]() Java was initially modeled after C and C++, minus some potentially confusing features. Let's consider each of these definitions separately. Java is a simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable, high-performance, multithreaded, dynamic computer language. This series has been updated for Java 12 and includes a quick introduction to the new jshell: an interactive tool for learning Java and prototyping Java code. Finally, you'll learn how to compile and run a simple Java app. I'll help you set up a Java Development Kit (JDK) on your system so that you can develop and run Java programs, and I'll get you started with the architecture of a typical Java application. You'll also learn about the role of the Java virtual machine (JVM) in deploying Java applications. This first article introduces the Java platform and explains the difference between its three editions: Java SE, Java EE, and Java ME. I will assume that you already have some programming experience, just not in Java. This series is technical, with plenty of code examples to help you grasp the concepts as we go along. The Java 101 series provides a self-guided introduction to Java programming, starting with the basics and covering all the core concepts you need to know to become a productive Java developer. So, you want to program in Java? That's great, and you've come to the right place. ![]()
0 Comments
Leave a Reply. |