Computer Science, asked by devishwas5, 1 year ago

What do you know about 'JAVA'?

Answers

Answered by tarbiya
2
Java is object oriented. Unchanged C++ or C code will not work in Java, in most cases, though Java looks much like C and C++.

Java can run on many different operating systems. This makes Java platform independent. Java does this by making the Java compilerturn code into Java bytecode instead of machine code. This means that when the program is executed, the Java Virtual Machine interprets the bytecode and translates it into machine code.

Java concepts

Java was developed to achieve 5 main goals. These are:

It should be simple, object-oriented, distributed and easy to learn.It should be robust and secure.It should be independent of a given computer architecture or platform.It should be very performant.It should be possible to write an interpreter for the language. The language should also support parallelism and use dynamic typing.

Java Platform

The Java platform refers to a group of software products from Sun Microsystems. The platform is used to develop and run Java programs. The platform includes the execution engine (called a Java Virtual Machine) that allows Java programs to do the same thing on different computer systems.

This capability of being able to develop software on one platform and running it on other platforms is called "cross-platform capability".

Java Program Example

An example "Hello World" java program:

/** * This is a simple program in Java. * It shows "Hello World!" on the screen. */ class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } }

Types of Java

There are many types of Java programs which run differently:

Java Applet - small program written in Java and that is downloaded from a website and executed within a web browser on a client computer.Application - executes on a client computer. If online, it has to be downloaded before being run.JAR file (Java archive) - used to package Java files together into a single file (almost exactly like a .zip file).Servlet - runs on a web server and helps to generate web pages.Swing application - used to build an application that has a GUI(windows, buttons, menus, etc.).EJB - runs on a web server and is used to develop large, complex websites.

Benefits

Java is commonly used to teach students how to program as a first language, yet is still also used by professionals.

Java requires that each variable be initialized. Some older languages such as C, allow variables to go uninitialized, which can cause random failures with mysterious bugs.Java requires that each methodthat declares a return type, always return a value. This also prevents bugs.Java comes with a large set of classes and methods, the Java API that can be used without having to develop as much code "from scratch".Unlike C, Java primitive types, such as int, are always the same size in the number of bits which helps achieve cross-platform compatibility.Java used to be thought of as being slower than C, but that's less important in recent years with computers being faster.Java has exception-handling that requires a programmer to handle error-conditions such an Input/Output errors.Code compiled on one Java platform can be run on other platforms that support Java without modification of either the source-code nor the byte-code. For example, this means that a person can make a Java program for a Windows computer and have it run a Linux computer or a Mac computer.

Criticism

The programming language Java has also been criticized. Some of the criticisms are:

Generics were added to Java in such a way so that existing code would still keep running. This was done using type erasure. This means that during compilation, the actual type of a generic argument is removed. This can lead to the Java interpreter to behave in unexpected ways at times.Java has no unsigned integer types, which languages like C heavily use. This also means that it is impossible to directly exchange numeric data between C and Java programs. Cryptographyalso relies on such types to some extent; this makes it more difficult to write applications that use cryptography in Java.The IEEE has defined a standard for floating-point arithmetic, IEE 754. Java only supports a part of the features of this standard.

Answered by MOSFET01
5
\huge{\blue{\underline{JAVA}}}

Type : Programming language.

Design by : James Gosling

Use : To develope a new application on computer.

Running on : Window , Mac OS and Linux

These programming language helps in designing a new application for our system help to make a graphic in the system. It is simple and used to develop games with a new graphics. Now some other Programming language like Python , C, C++ will be introduced in a field of computer science.
Similar questions