JAVA Programming Simplified
eBook - ePub

JAVA Programming Simplified

From Novice to Professional - Start at the Beginning and Learn the World of Java

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

JAVA Programming Simplified

From Novice to Professional - Start at the Beginning and Learn the World of Java

Book details
Book preview
Table of contents
Citations

About This Book

From Novice to Professional - Start at the Beginning and Learn the World of Java Key Features

  • Covers the key concepts of Java Programming
  • Programming examples are provided to understand the concepts well
  • Designed to cover the syllabus of BCA, BSc-IT and Mater level Courses in Computer Applications
  • Step by Step instructions are provided to get more clarity on the topic
  • Covers Core Java along with some advanced topics of Java Programming
  • Description
    This book has been designed in such a manner so as to make anyone understand the Java language, with a lot of practical examples implemented on the Eclipse platform. This book comprehensively covers all the concepts of Java, starting with the installation of Java and the usage of IDE for Java development and efficiently covers all required topics of Java language with some advanced concepts like JDBC and event handling in Java. What will you learn
  • Java Fundamentals with installation and configuration
  • Core Java with relevant programming examples
  • Important features of Java-like applets and multithreading
  • Event handling with graphical user interface components
  • Java Database Connectivity with some practical examples

  • Who this book is for
    This book is useful for beginner programmers having no knowledge of any programming language. However, programmers who have done some basic programming in C and C++, can easily reach some advanced concepts and move ahead with the advanced Java. Table of Contents
    1. Introduction & Installation
    2. Basics of Java Programming
    3. Object-Oriented Programming in Java
    4. Packages and Interfaces
    5. Understanding Strings, Arrays and Wrapper classes
    6. Exception Handling in Java
    7. Multithreading in Java
    8. Applets in Java
    9. Input-Output in Java
    10 Event Handling in Java
    11 Java Database Connectivity
    About the Author
    Dr Muneer Ahmad Dar is currently working as Scientist-C at the National Institute of Electronics and Information Technology (NIELIT), J&K which is the department under Ministry of Electronics and Information Technology, MeitY, Govt of India. He is a researcher, teacher, and Head, Department of MCA at NIELIT Srinagar. He is actively involved in the field of Computer Science. He has done his Masters in Computer Applications (MCA) from the University of Kashmir, M.Phil (Computer Science) from Madurai Kamaraj University and PhD (Computer Science) from University of Kashmir. His areas of interest include Security of Smartphone Applications, Programming Languages, Design & Analysis of Algorithms, Data Structures and Optimization Techniques. As a creative writer, he has authored a large number of research papers and book chapters, published in IEEE, Scopus indexed journals and Springer Lecture Notes.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access JAVA Programming Simplified by Dr. Muneer Ahmad Dar in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation en Java. We have over one million books available in our catalogue for you to explore.

Information

Year
2020
ISBN
9789389845143

CHAPTER 1

Introduction and Installation

Introduction

Every enterprise uses Java in one-way or other. As per Oracle, more than 3 billion devices run applications designed on this development platform. Java is used to design the applications ranging from desktop GUI, embedded systems, web applications, including e-commerce applications, front and back office electronic trading systems, settlement and confirmation systems, data processing, web servers and application servers, mobile applications including Android applications, enterprise applications, scientific applications, and middleware products.
Having the wide range of applications we need enough individuals with skills in Java application development using Java to develop this infrastructure. Programming languages grow for two reasons: to become accustomed to transformations in surroundings and to put into practice advancements in the ability of programming. The environmental alteration that encouraged Java was the requirement for platform-independent programs intended for sharing on the internet.
On the other hand, Java also embodies changes in the way that people move towards the writing of programs. for instance, Java improved and sophisticated the object-oriented model used by C++ and other object oriented programming languages, furtherincorporated support for multithreading, and provided a library that simplified internet access. Java is the idealreply to the demands of therecentlybudding, extremelydispersed computing world. Java is to Internet programming what C was to system programming: aninnovativestrength that changed the world.

Structure

  • Introduction
  • History of Java
  • Features of Java
  • Downloading and installing the JDK
  • JDK version
  • Configuring Java development environment
  • The Eclipse IDE
  • Assignments

Objective

This chapter provides a detailed background of the java programming language. After reading this chapter, a reader will be capable of installing the Java and handling the Eclipse IDE to design and develop various Java projects.

History of Java

Initially named as Oak in 1991 by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan was later renamed as Java in 1995 while working at Sun MicroSystems, many people contributed to the blueprint and advancement of Java language but the people who contributed mainly are Tim Lindholm, Frank Yellin, Jonathan Payne, Bill Joy, and Arthur van Hoff.The novel thrust meant for Java was not the internet based applications but, the principal inspiration was the requirement for a platform-independent or in other words the architecture-neutral language that may perhaps be used to generate software to be embedded in a variety of customer electronic equipments, for instance microwave ovens and remote controls. As we can most likely presume, many different types of CPUs are used as controllers. In an effort to discover such a resolution, Gosling and others began work on a portable, platform-independent language that may well be used to construct code that would run on a range of CPUs under differing platforms. This endeavoreventually led to the foundation of Java programming language.

Features of Java

The popularity of Java is because of its wide range of features that contributed to the success of Java as a language. Some of the features of Java are as under:
  • Simple and familiar: With the vision of Sun Microsystems to develop a language, which is simple and familiar, the Java language has its syntax from C and object-oriented concepts from C++. Java being a case sensitive language as is the case of C, it has removed the concept of pointers (except this pointer), operator overloading, template classes, global variables, and header files. A programmer having good knowledge of C and C++ can make use of the syntax and control structures from C and object-oriented concepts from C++. This feature of Java makes it a simple and familiar language.
  • Compiled and interpreted: If we consider the case of any other language, it is either compiled or interpreted as in C we compile it and run it to generate the output. In Java we first compile it using javac (Compiler) to generate the bytecode file having .class extension. After compilation we have to use java (Interpreter) to generate the output. This two-step process that generates the bytecode file makes this language secure and platform independent.
  • Platform independent: The main reason for the success of Java programming language is its capability to run any platform. Java programs can be easily moved from one computer system to another, anywhere and anytime. Changes and upgrades in operating system, processors, and system resources will not force any changes in the Java program. This is the reason for Java being so popular for the internet programming. One such example is the use of Java applets as they can be downloaded from a remote computer onto our local machine through internet and can be executed locally.
    As already explained, Java programs are compiled, a bytecode file is generated, and this file can be executed on any machine. The second advantage of using Java is the size of its primitive data types, which are machine independent.
  • Object-oriented: The most important feature of using Java as a programming language is its capability to encapsulate and implement everything in terms of objects and classes. Java being a true object-oriented language has a vast variety of packages (group of classes) to implement a wide range of functionalities. Thus, we may say that whatever the advantages and features of an object-oriented programming are, they are automatically applicable to Java.
  • Secure and robust: Being implemented as a first choice language for the internet programming, the Java has secured itself from number of security risks. The absence of pointers, verification of all memory access and proper scrutiny of applets are some of the measures taken by Java to make it secure.
    Java has a strict compile time and run time checking for data types to ensure the reliable code. The exception handling that captures the run time errors and eliminates the risk of crashing the system and proper memory management in terms of garbage collection are the reasons for this language being robust.
  • Multi threaded: Java language is capable of dividing its program into multiple tasks and executing them simultaneously. For example, one task may be copying the file while another two tasks are displaying an animation and playing the music. The user is given the impression that all the three tasks are getting executed simultaneously. The operating system issues like the inter thread communication and synchronization is efficiently implemented by themultithreading capability of Java.
  • Performance: The performance of Java is high mainly due to the intermediate bytecode file and its efficient architecture to reduce overheads during runtime. Furthermore, the multithreading contributes to the Javaā€™s performance by enhancing the overall execution speed of Java programs.
  • Programmer friendly: The features like enhanced forloop, generics, autoboxing or unboxing, type safeenums, static import and annotations make Java a programmer friendly language.
  • There are many other features like scalability and performance, JDBC, core XML support, and many more, on the basis of which Java is considered as a powerful and popular language.

Downloading and installing the JDK

The Java Development Kit (JDK), named officially as Java Platform Standard Edition or Java SE, is the main requirement for writing Java programs ranging from small to a large java projects. The JDK is freely available from Sun Microsystems (now part of Oracle). The JDK (Java SE) can be downloaded free of cost from the below website. http://www.oracle.com/technetwork/java/javase/overview/index.html.
JDK, which includes Java Runtime (JRE) and t...

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. About the Reviewer
  7. Acknowledgement
  8. Preface
  9. About the Book
  10. Errata
  11. Table of Contents
  12. 1. Introduction and Installation
  13. 2. Basics of Java Programming
  14. 3. Object-Oriented Programming (OOP) in Java
  15. 4. Packages and Interfaces in Java
  16. 5. Understanding Arrays, Strings, and Wrapper Classes
  17. 6. Exception Handling in Java
  18. 7. Multithreading in Java
  19. 8. Applets in Java
  20. 9. Input and Output in Java
  21. 10. Event Handling in Java
  22. 11. Java Database Connectivity