The document discusses Java programming. It provides an overview of Java, including that it is a platform-independent, object-oriented language. It also lists some key advantages of Java such as being simple, secure, portable, and able to perform tasks simultaneously through multithreading. The document then gives examples of basic Java programs and components such as main methods, identifiers, variables, and arrays.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
A presentation on core java. in this ppt there are all the basic informations on the core java suvh as-
Features of Java
Java Program Translation
Java Virtual Machine
Java system overview
Java Program-Development phase
Advantage of java
Disadvantage of java
Project
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
A presentation on core java. in this ppt there are all the basic informations on the core java suvh as-
Features of Java
Java Program Translation
Java Virtual Machine
Java system overview
Java Program-Development phase
Advantage of java
Disadvantage of java
Project
Introduction to Java : Feature to Java, Java Virtual Machine, Differences between C++ and Java,
Part of Java, API Document, Starting a Java Program. Important Classes, Formatting the Output
In this Java tutorial, we are going to learn about java evolution, development of Java language, java features, Java frameworks, and Java support systems. Java tutorial covers various development tools, classes in Java programming, and Java methods which comprises the Java environment. This tutorial on java will help you get a quick insight into the Java programming language and thus, help you learn java language.
Java Tutorial or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. Let's start learning Java from basic questions like what is Java tutorial, Core Java, where it is used, what type of applications are created in Java, why use java and Java platforms etc. Our Java tutorial helps you to learn Java with easy and simple examples.
JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code.
TechSearhWeb is a tutorial site for different technologies to make quality education. We want to spread good education worldwide. The aim is to understand the language very easily and get through any problem to understand the basics and advance of any language.
This website has been developed for every people to get more knowledge for every person, share their knowledge, and be ready to get a job.
Read More Here:
https://www.techsearchweb.com
What is Java
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. It was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
The latest release of the Java Standard Edition is Java SE 10. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile Applications.
The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.
Features of Java
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.
Simple − Java is designed to be easy to learn. If you understand the basic concept of OOP Java, it would be easy to master.
Secure − With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.
Architecture-neutral − Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on many processors, with the presence of Java runtime system.
Portable − Being architecture-neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler in Java is written in ANSI C with a clean portability boundary, which is a POSIX subset.
Robust − Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.
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.
Interpreted − Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light-weight process.
High Performance − With the use of Just-In-Time compilers, Java enables high performance.
Distributed − Java is designed for the distributed environment of the internet.
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 extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
Basic concepts of OOPs are:
Object
Class
Inheritance
Polymorphism
Abstraction
Encapsulati
Introduction to Java : Feature to Java, Java Virtual Machine, Differences between C++ and Java,
Part of Java, API Document, Starting a Java Program. Important Classes, Formatting the Output
In this Java tutorial, we are going to learn about java evolution, development of Java language, java features, Java frameworks, and Java support systems. Java tutorial covers various development tools, classes in Java programming, and Java methods which comprises the Java environment. This tutorial on java will help you get a quick insight into the Java programming language and thus, help you learn java language.
Java Tutorial or Core Java Tutorial or Java Programming Tutorial is a widely used robust technology. Let's start learning Java from basic questions like what is Java tutorial, Core Java, where it is used, what type of applications are created in Java, why use java and Java platforms etc. Our Java tutorial helps you to learn Java with easy and simple examples.
JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code.
TechSearhWeb is a tutorial site for different technologies to make quality education. We want to spread good education worldwide. The aim is to understand the language very easily and get through any problem to understand the basics and advance of any language.
This website has been developed for every people to get more knowledge for every person, share their knowledge, and be ready to get a job.
Read More Here:
https://www.techsearchweb.com
What is Java
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. It was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
The latest release of the Java Standard Edition is Java SE 10. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile Applications.
The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.
Features of Java
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.
Simple − Java is designed to be easy to learn. If you understand the basic concept of OOP Java, it would be easy to master.
Secure − With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.
Architecture-neutral − Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on many processors, with the presence of Java runtime system.
Portable − Being architecture-neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler in Java is written in ANSI C with a clean portability boundary, which is a POSIX subset.
Robust − Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.
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.
Interpreted − Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light-weight process.
High Performance − With the use of Just-In-Time compilers, Java enables high performance.
Distributed − Java is designed for the distributed environment of the internet.
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 extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
Basic concepts of OOPs are:
Object
Class
Inheritance
Polymorphism
Abstraction
Encapsulati
TechSearhWeb is a tutorial site for different technologies to make quality education. We want to spread the good education worldwide. The aim to understand the language very easily get through the any problem to understand the basic and advance of any language.
This website has been developed for every people to getting more knowledge for every person, share their knowledge and ready to get the job.
What is Java
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. It was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
The latest release of the Java Standard Edition is Java SE 10. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile Applications.
The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.
Java String
In Java, String is basically an object that represents sequence of char values. An array of characters works same as Java string. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings.
Exception in Java
An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at run time, that disrupts the normal flow of the program’s instructions.
Exception is an abnormal condition.In Java, an exception is an event that disrupts the normal flow of the program. It is an object which is thrown at runtime.
What is Exception Handling
Exception Handling is a mechanism to handle runtime errors such as ClassNotFoundException, IOException, SQLException, RemoteException, etc.
Collections in Java
The Collection in Java is a framework that provides an architecture to store and manipulate the group of objects.
Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion.
Java Collection means a single unit of objects. Java Collection framework provides many interfaces (Set, List, Queue, Deque) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet).
The Java Collections Framework is a collection of interfaces and classes which helps in storing and processing the data efficiently. This framework has several useful classes which have tons of useful functions which makes a programmer task super easy.
Basic of Selenium
Selenium is one of the most widely used open source Web UI (User Interface) automation testing suite.
Selenium tutorial provides basic and advanced concepts of Selenium. Our Selenium tutorial is designed for beginners and professionals.
Web Service
A web service is any piece of software that makes java API..
What is Java
Java is a programming language and a platform. Java is a high level, robust, object-oriented and secure programming language. It was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java platform (Java 1.0 [J2SE]).
The latest release of the Java Standard Edition is Java SE 10. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platforms. For example: J2EE for Enterprise Applications, J2ME for Mobile Applications.
The new J2 versions were renamed as Java SE, Java EE, and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.
Exception in Java
An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at run time, that disrupts the normal flow of the program’s instructions.
Exception is an abnormal condition.In Java, an exception is an event that disrupts the normal flow of the program. It is an object which is thrown at runtime.
What is Spring
Spring is a lightweight framework and an open source Java platform that provides comprehensive infrastructure support for developing robust Java applications very easily and very rapidly. Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003. This tutorial has been written based on Spring Framework version 4.1.6 released in Mar 2015. It can be thought of as a framework of frameworks because it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF, etc. The framework, in broader sense, can be defined as a structure where we find solution of the various technical problems.
The Spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc. We will learn these modules in next page. Let's understand the IOC and Dependency Injection first.
Web Service
A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications to a web service. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response. As all communication is in XML, web services are not tied to any one operating system or programming language java can talk with Perl; Windows applications can talk with Unix applications.
Web Services tutorial is designed for beginners and professionals providing basic and advanced concepts of web services such as protocols, SOAP, RESTful, java web service implementation, JAX-WS and JAX-RS tutorials and examples.
Web service is a technology to communicate one programming language with another. For example, java programming language can interact with PHP and .Net by using web services. In other words, web service provides a way to achieve interoperability.
Web services are self-contained, modular, and distributed.
Introduction to Java: History, Versioning, The Java Virtual Machine, Byte code, Writing simple
java program, Language Components: Primitive Data Types, Comments, Keywords, literals, The
break Statement, The continue Statement, Operators – Casts and Conversions, Arrays. Introduction
to classes and methods, constructors, Passing Objects to Methods, Method Overloading, Static and
final, The this Reference, finalize, inner and nested classes. Inheriting class, extends, member
access and inheritance, super keyword, Object class. Dynamic method dispatch, method overriding,
abstract class, interface, packages, import statement
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
What is the purpose of the Sabbath Law in the Torah. It is interesting to compare how the context of the law shifts from Exodus to Deuteronomy. Who gets to rest, and why?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
2. Java Programming language.
• Java is a high-level programming
language originally developed by
Sun Microsystems and released in
1995. Java runs on a variety of
platforms, such as Windows, Mac
OS, and the various versions of
UNIX.
3. Reason for Learn java Programming
Java is a MUST for students and working
professionals to become a great Software Engineer specially when
they are working in Software Development Domain. I will list down
some of the key advantages of learning Java Programming:
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.
Simple − Java is designed to be easy to learn. If you understand the
basic concept of OOP Java, it would be easy to master.
4. Secure − With Java's secure feature it enables to develop
virus-free, tamper-free systems. Authentication techniques are
based on public-key encryption.
Architecture-neutral − Java compiler generates an
architecture-neutral object file format, which makes the
compiled code executable on many processors, with the
presence of Java runtime system.
Portable − Being architecture-neutral and having no
implementation dependent aspects of the specification makes
Java portable. Compiler in Java is written in ANSI C with a
clean portability boundary, which is a POSIX subset.
Robust − Java makes an effort to eliminate error prone
situations by emphasizing mainly on compile time error
checking and runtime checking.
5. Applications of Java Programming
The latest release of the Java Standard
Edition is Java SE 8. With the advancement of Java
and its widespread popularity, multiple
configurations were built to suit various types of
platforms. For example: J2EE for Enterprise
Applications, J2ME for Mobile Applications.
The new J2 versions were renamed as Java SE, Java
EE, and Java ME respectively. Java is guaranteed to
be Write Once, Run Anywhere.
6. 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.
Interpreted − Java byte code is translated on the fly to native
machine instructions and is not stored anywhere. The
development process is more rapid and analytical since the
linking is an incremental and light-weight process.
High Performance − With the use of Just-In-Time compilers, Java
enables high performance.
Distributed − Java is designed for the distributed environment of
the internet.
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 extensive amount of run-time information
that can be used to verify and resolve accesses to objects on run-
time.
7. History of Java
James Gosling initiated Java language project in June 1991 for
use in one of his many set-top box projects. The language, initially
called ‘Oak’ after an oak tree that stood outside Gosling's office, also
went by the name ‘Green’ and ended up later being renamed as Java,
from a list of random words.
Sun released the first public implementation as Java 1.0 in 1995. It
promised Write Once, Run Anywhere (WORA), providing no-cost
run-times on popular platforms.
On 13 November, 2006, Sun released much of Java as free and open
source software under the terms of the GNU General Public License
(GPL).
On 8 May, 2007, Sun finished the process, making all of Java's core
code free and open-source, aside from a small portion of code to which
Sun did not hold the copyright.
8. Java is −
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.
Simple − Java is designed to be easy to learn. If you understand the basic concept of
OOP Java, it would be easy to master.
Secure − With Java's secure feature it enables to develop virus-free, tamper-free
systems. Authentication techniques are based on public-key encryption.
Architecture-neutral − Java compiler generates an architecture-neutral object file
format, which makes the compiled code executable on many processors, with the
presence of Java runtime system.
Portable − Being architecture-neutral and having no implementation dependent aspects
of the specification makes Java portable. Compiler in Java is written in ANSI C with a
clean portability boundary, which is a POSIX subset.
9. Robust − Java makes an effort to eliminate error prone situations by
emphasizing mainly on compile time error checking and runtime
checking.
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.
Interpreted − Java byte code is translated on the fly to native machine
instructions and is not stored anywhere. The development process is
more rapid and analytical since the linking is an incremental and light-
weight process.
High Performance − With the use of Just-In-Time compilers, Java
enables high performance.
Distributed − Java is designed for the distributed environment of the
internet.
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 extensive amount of run-time information that can be used to
verify and resolve accesses to objects on run-time.
10. Tools You Will Need
For performing the examples discussed in this tutorial, you will need a
Pentium 200-MHz computer with a minimum of 64 MB of RAM (128 MB of
RAM recommended).
You will also need the following softwares −
Linux 7.1 or Windows xp/7/8 operating system
Java JDK 8
Microsoft Notepad or any other text editor
This tutorial will provide the necessary skills to create GUI, networking, and
web applications using Java.
Popular Java Editors
To write your Java programs, you will need a text editor. There are even more
sophisticated IDEs available in the market. But for now, you can consider one of
the following −
Notepad − On Windows machine, you can use any simple text editor like Notepad
(Recommended for this tutorial), TextPad.
Netbeans − A Java IDE that is open-source and free which can be downloaded
from https://www.netbeans.org/index.html.
Eclipse − A Java IDE developed by the eclipse open-source community and can
be downloaded from https://www.eclipse.org/.
11. First Java Program
Let us look at a simple code that will print the words Hello World.
Example
public class MyFirstJavaProgram { /* This is my first java program. * This will print 'Hello
World' as the output */
public static void main(String []args)
{
System.out.println("Hello World"); // prints Hello World
} }
Let's look at how to save the file, compile, and run the program. Please follow the
subsequent steps −
Open notepad and add the code as above.
Save the file as: MyFirstJavaProgram.java.
Open a command prompt window and go to the directory where you saved the
class. Assume it's C:.
Type 'javac MyFirstJavaProgram.java' and press enter to compile your code. If
there are no errors in your code, the command prompt will take you to the next
line (Assumption : The path variable is set).
Now, type ' java MyFirstJavaProgram ' to run your program.
You will be able to see ' Hello World ' printed on the window.
13. •Java Identifiers
•All Java components require names. Names used for
classes, variables, and methods are called identifiers.
In Java, there are several points to remember about
identifiers. They are as follows −
All identifiers should begin with a letter (A to Z or a to z),
currency character ($) or an underscore (_).
After the first character, identifiers can have any
combination of characters.
A key word cannot be used as an identifier.
Most importantly, identifiers are case sensitive.
Examples of legal identifiers: age, $salary, _value,
__1_value.
Examples of illegal identifiers: 123abc, -salary.
14. Java Modifiers
Like other languages, it is possible to modify classes,
methods, etc., by using modifiers. There are two categories
of modifiers −
Access Modifiers − default, public , protected, private
Non-access Modifiers − final, abstract, strictfp
We will be looking into more details about modifiers in the
next section.
Java Variables
Following are the types of variables in Java −
Local Variables
Class Variables (Static Variables)
Instance Variables (Non-static Variables)
15. Java Arrays
Arrays are objects that store multiple variables
of the same type. However, an array itself is an object on
the heap. We will look into how to declare, construct, and
initialize in the upcoming chapters.
Java Enums
Enums were introduced in Java 5.0. Enums restrict a
variable to have one of only a few predefined values. The values in
this enumerated list are called enums.
With the use of enums it is possible to reduce the number of bugs in
your code.
For example, if we consider an application for a fresh juice shop, it
would be possible to restrict the glass size to small, medium, and
large. This would make sure that it would not allow anyone to order
any size other than small, medium, or large
16. Java Keywords
The following list shows the
reserved words in Java. These reserved words
may not be used as constant or variable or any
other identifier names.
17. Comments line
Java supports single-line and multi-line comments
very similar to C and C++. All characters available inside
any comment are ignored by Java compile
public class MyFirstJavaProgram { /* This is my first java
program. * This will print 'Hello World' as the output *
This is an example of multi-line comments. */ public static
void main(String []args) { // This is an example of single
line comment /* This is also an example of single line
comment. */ System.out.println("Hello World"); } }
Output
Hello World