Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

What is java?

Java is a widely used object-oriented programming language and software platform


that runs on billions of devices, including notebook computers,
mobile devices, gaming consoles, medical devices and many others. The rules and
syntax of Java are based on the C and C++ languages.

One major advantage of developing software with Java is its portability. Once you
have written code for a Java program on a notebook computer,
it is very easy to move the code to a mobile device

why java?
Java has significant advantages over other languages and environments that make it
suitable for just about any programming task.
The advantages of Java are as follows: Java is easy to learn. Java was designed to
be easy to use and is therefore easy to write,
compile, debug, and learn than other programming languages.

Application of java?

Mobile Applications , Desktop GUI Applications,Web-based Applications,Enterprise


Applications,Scientific Applications,
Gaming Applications,Big Data technologies,Business Applications.

Systax of java?
The syntax of Java refers to the set of rules defining how a Java program is
written and interpreted.

The syntax is mostly derived from C and C++. Unlike in C++, in Java there are no
global functions or variables, but there are data members
which are also regarded as global variables. All code belongs to classes and all
values are objects. The only exception is the primitive types
, which are not represented by a class instance for performance reasons (though can
be automatically converted to objects and vice versa via autoboxing)

. Some features like operator overloading or unsigned integer types are omitted to
simplify the language and to avoid possible programming mistakes.

Keywords in java ?
The Java syntax has been gradually extended in the course of numerous major JDK
releases, and now supports capabilities such as generic programming and
function literals (called lambda expressions in Java). Since 2017, a new JDK
version is released twice a year, with each release bringing incremental
improvements to the language.

continue
default
else
enum
extends
float
for
goto
import
instance
of
int
native
Data types in java?

boolean data type, byte data type, char data type, short data type, int data type,
long data type, float data type, double data type

What are the keyword in the main method?

Java’s main method is composed of six terms — three reserved words, the main method
name, a reference type and a variable name:

public – Java’s main function requires a public access modified.


static – Java’s main method is static, which means no instances need to be created
beforehand to invoke it.
void – Some programming languages return a zero or 1 to indicate the main method
has run successfully to complete. Java’s main function is void,
which means it does not return any value when it completes.
main – When the JVM starts a standalone application, the main method is the
function that gets invoked.
String[ ] – An array of configuration parameters to be used by the application can
be passed into the main function as arguments.
args – The configuration parameters passed into the main function in Java are
typically named args.

WHAT ARE THE KEYWORDS IN CLASS DECLARATION?

ans: The keyword is used to create a class EVERY LINE OF CODE THAT RUNS IN
JAVA MUST BE INSIDE A CLASS. A class should always start with in uppercase first
letter,
and the name of java file must matchthe class name.
In generalm,class declaration can include these components,in order:
1.Modifiers such as public,private,and a number of others that you
will encounter later.
2.The class name,with the initial letter capitalized by convention.
3.The name of the classes parent(superclass),if any,proceed by the
keyword extends.
4.A comma-separated list of interfaces implemented by the class
proceed by ketword implements.
5.The class body,surrounding by brases{}.

You might also like