100+ Solutions in Java A Hands-On Introduction to Programming in Java (DHRUTI SHAH) (Z-Library)

Author: DHRUTI SHAH

Java

A step by step guide that will help you learn the Java programming language KEY FEATURES ●Get familiar with the features in Java 8 And Java 9 ●Understand the working of various Java APIs ●Learn Modular Programming with Java 9 ●Learn to use features such as Lambda, Time API, and Stream API. ●Learn how to access databases from a Java application DESCRIPTION 100+ Solutions in Java is an easy-to-understand step-by-step guide that helps you develop applications using Java 8 and Java 9. It is for everyone, from beginners to professionals, who wish to begin development in Java. The content is designed as per increasing complexity and is explained in detail with appropriate examples. This book follows a practical approach by providing ample examples and assignments for you to test your understanding of each concept. You will also get familiar with the important features introduced in Java 10. This book is a “beginner’s guide” that will help you upskill your knowledge in Java. By the end of the book, you will know the different features introduced in Java over the years and will learn to implement these features to develop real-world applications. WHAT YOU WILL LEARN ●Work with the newly introduced features in Java 8 And Java 9 ●Get to know in-depth about the Java Stream API ●Learn how to work with Java regular expressions ●Get an overview of Inheritance and Interfaces in Java ●Get familiar with Design Patterns in Java WHO THIS BOOK IS FOR This book is for Developers and Technical Specialists who are interested in learning Java. Prior knowledge of programming languages such as C, C++, or Python and any DBMS such as SQL Server, MySQL will be an added advantage. TABLE OF CONTENTS 1. Introduction to Java 2. Java Programming Constructs 3. Java Application Components 4. Java Reference Types 5. Subclasses and Interfaces 6. Exceptions and Regular Expressions 7. Collections and Stream API 8. Generics and Time API 9. File Manipulation in Java 10. Threads and JDBC 11. Design Patterns

📄 File Format: PDF
💾 File Size: 5.4 MB
36
Views
0
Downloads
0.00
Total Donations

📄 Text Preview (First 20 pages)

ℹ️

Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

📄 Page 1
(This page has no text content)
📄 Page 2
100+ Solutions in Java A Hands-On Introduction to Programming in Java Dhruti Shah www.bpbonline.com
📄 Page 3
FIRST EDITION 2021 Copyright © BPB Publications, India ISBN: 978-93-89845-600 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication, photocopy, recording, or by any electronic and mechanical means. LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The information contained in this book is true to correct and the best of author’s and publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but publisher cannot be held responsible for any loss or damage arising from any information in this book. All trademarks referred to in the book are acknowledged as properties of their respective owners but BPB Publications cannot guarantee the accuracy of this information. Distributors:
📄 Page 4
BPB PUBLICATIONS 20, Ansari Road, Darya Ganj New Delhi-110002 Ph: 23254990/23254991 MICRO MEDIA Shop No. 5, Mahendra Chambers, 150 DN Rd. Next to Capital Cinema, V.T. (C.S.T.) Station, MUMBAI-400 001 Ph: 22078296/22078297 DECCAN AGENCIES 4-3-329, Bank Street, Hyderabad-500195 Ph: 24756967/24756400
📄 Page 5
BPB BOOK CENTRE 376 Old Lajpat Rai Market, Delhi-110006 Ph: 23861747 Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai www.bpbonline.com
📄 Page 6
Dedicated to Swara and Aaria My nieces who are the light of my life.
📄 Page 7
About the Author Dhruti Shah is a multi-skilled, tech-savvy person with over 15 years of experience as a software trainer, technical writer, and manager in the IT education industry. She has been working extensively with Java technology for the last 10 years. She is a Microsoft Certified Training Specialist who has trained over 2000 candidates worldwide on more than 10 technologies. She has been appreciated as a model representative for India for flawlessly managing two prestigious International projects to set up and upgrade the Centre of Excellence in Information Technology in Panama and Costa Rica, Central America (a collaboration project of the Indian government with the governments of Panama and Costa Rica).
📄 Page 8
Acknowledgement Writing a book on a technology that I have been obsessed with since I first learned about it years ago was a gratifying experience. However, it could never have been possible without the support of all my family members and friends. They always believed in me, encouraged me to follow my dreams, and gave me the confidence to face my struggles. I would like to thank my mother, Mrs. Ushakiran Shah, who is my friend, philosopher, and guide. Her belief in me and my aspirations has given me the courage to face challenges head-on and emerge a victor. Further, I would like to thank all my colleagues who have given me valuable advice time and again during the journey of writing this book. Finally, I would like to extend my gratitude to the entire team of BPB publications for their support and appreciation of my work.
📄 Page 9
Preface Java is a programming language that has been around for decades and has proved its potential as a versatile programming language. Over the years, Java has advanced tremendously and has become one of the most preferred programming languages for the development of applications ranging from standalone to web applications as well as mobile apps. It is no longer a simple client-side language but is more dynamic and supports the development for application servers, embedded devices, and much more. This book is a result of several years of application development in Java and the experience gained by using different features introduced with each new version of Java. The goal of this book is to give a beginner enough knowledge to start application development in Java. Java is an evolving technology, and this book attempts to introduce the readers to the basic features of Java and the new features of Java 8, 9, and 10. It aims to gradually introduce the reader to a new programming approach called modular programming. The book presumes that the reader has a basic idea about programming and aspires to begin development using Java. It has been written after extensive research and provides ample examples and demonstrations to help you take the first step to learn the new technology. This book will prove to be a great reference for beginners as well as professionals to begin development in Java. Over the 12 chapters in this book, you will learn the following:
📄 Page 10
Chapter introduces the concept of object-oriented programming and explains how Java has evolved as an object-oriented programming (OOP) language. It explains the versions and features of Java and steps to create an application by using JDK 8 and JDK 10. Chapter discusses the different programming constructs of the Java language such as comments, variables, data types, and operators. It also shows you the use of decision-making constructs, looping constructs, and branch statements. Chapter introduces Java classes, objects, variables, methods, access specifiers, and constructors. It explains the implementation of polymorphism, the creation of packages, and the use of keywords such as static, final, and this keyword. Chapter discusses the different types of Arrays and String class. It also shows you the use of StringBuilder and StringTokenizer classes, command-line arguments, and wrapper classes. Chapter discusses the concept of inheritance in Java in depth and different ways of implementing inheritance by using abstract classes, nested classes, and so on. It also explains the user interfaces and lambda expressions. Chapter describes exception handling with built-in exception classes and custom exceptions. It further introduces the important classes of the java.lang and java.util.regex packages.
📄 Page 11
Chapter introduces the more advanced features such as the Collections framework with the different utility classes and interfaces of the java.util package. Chapter describes the use of generics in Java to create generic classes, methods, and collections. It also introduces the Time API that provides better support for date and time. Chapter describes different types of streams of the java.io package for file management. Further, it introduces the different classes of the java.util.zip and java.nio packages. Chapter explains how to create thread and multithreading to improve the performance of applications. It also describes how to connect to databases by using the JDBC API. Chapter explains the use of design patterns as solutions to common problems encountered during software development. It also describes internationalization and localization of an application. Chapter describes some prominent new features of Java 8 to 10 such as the Java Platform Module System (JPMS), JShell, JLink tool, local variable type Inference, and so on.
📄 Page 12
Downloading the code bundle and coloured images: Please follow the link to download the Code Bundle and the Coloured Images of the book: https://rebrand.ly/i6o42il Errata We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors, if any, that may have occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at : errata@bpbonline.com Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
📄 Page 13
Did you know that BPB offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.bpbonline.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at business@bpbonline.com for more details. At you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on BPB books and eBooks.
📄 Page 14
BPB is searching for authors like you If you're interested in becoming an author for BPB, please visit www.bpbonline.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea. The code bundle for the book is also hosted on GitHub at In case there's an update to the code, it will be updated on the existing GitHub repository. We also have other code bundles from our rich catalog of books and videos available at Check them out! PIRACY If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at business@bpbonline.com with a link to the material. If you are interested in becoming an author
📄 Page 15
If there is a topic that you have expertise in, and you are interested in either writing or contributing to a book, please visit REVIEWS Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at BPB can understand what you think about our products, and our authors can see your feedback on their book. Thank you! For more information about BPB, please visit
📄 Page 16
Table of Contents 1. Introduction to Java Structure Objectives 1.1 Introduction to object-oriented programming 1.2 Java programming language 1.2.1 Features and advantages of Java 1.3 Java platform and editions 1.4 Java SE platform components 1.5 Java SE version history 1.6 Features of Java SE 9 and Java SE 10 Features of Java SE 10 1.7 Downloading and installing JDK 8 and JDK 10 1.8 Setting up the path for JDK 1.9 Java application development 1.10 Structure of a Java program 1.11 Java code compilation and execution 1.12 Creating and executing a Java program using JDK 8 1.13 Creating and executing a Java program using JDK 10 1.14 Creating and executing a Java 8 project in NetBeans 1.15 Creating and executing a Java 10 project in NetBeans Summary Multiple choice questions Answers Assignment 2. Java Programming Constructs Structure
📄 Page 17
Objectives 2.1 Java comments Single-line comments Multi-line comments Javadoc comments 2.2 Variables in Java Types of variables 2.3 Data types in Java Primitive data types Non-primitive data types 2.4 Type casting 2.5 Literals and escape sequences Escape sequences 2.6 Constants and enumerations 2.7 Operators in Java Assignment Arithmetic Unary Conditional/Relational Logical Short-circuit behavior Bitwise Ternary 2.8 Operator precedence and associativity 2.9 Formatting the output 2.10 Scanner class for input 2.11 Decision-making constructs ‘if ’ statement Variations of ‘if ’ statement switch-case statement
📄 Page 18
Variations of the switch-case statement 2.12 Looping constructs while loop Variations of the while loop do-while statement for statement Variations of the for statement Enhanced ‘for’ loop 2.13 Jump statements Labeled Jump statements Summary Multiple choice questions Answers Assignment 3. Java Application Components Structure Objectives 3.1 Java classes and objects 3.2 Access specifiers 3.3 Instance variables and methods 3.4 Constructors 3.5 Initializer blocks 3.6 Pass-by-value and pass-by-reference Passing arguments by value Passing arguments by reference 3.7 Variable argument method (Varargs) 3.8 Method overloading 3.9 Constructor overloading 3.10 ‘this’ keyword 3.11 ‘final’ keyword
📄 Page 19
3.12 ‘static’ keyword 3.13 Packages Summary Multiple choice questions Answers Assignment 4. Java Reference Types Structure Objectives 4.1 Java Arrays 4.1.1 Single-dimensional array 4.1.2 Multi-dimensional array 4.1.3 Processing arrays with loops 4.2 String class in Java 4.3 String arrays 4.4 StringBuilder class in Java 4.5 StringTokenizer class in Java 4.6 Passing arguments to the main() method 4.7 Java wrapper classes Summary Multiple choice questions Answers Assignment 5. Subclasses and Interfaces Structure Objectives 5.1 Inheritance in Java 5.1.1 Creating a subclass
📄 Page 20
5.1.2 Method overriding 5.1.3 Static v/s dynamic binding Differentiate between the type of reference and type of object 5.2 Abstract methods and classes 5.3 Nested classes 5.4 Interfaces 5.4.1 Implementing multiple interfaces 5.4.2 Default, static, and private methods of interfaces 5.4.3 Issues with default methods 5.5 Java functional interfaces 5.6 Lambda expressions Lambda expression examples Method and constructor references Summary Multiple choice questions Answers Assignment 6. Exceptions and Regular Expressions Structure Objectives 6.1 Exceptions in Java 6.1.1 Types of Exceptions Checked exceptions Unchecked exceptions 6.2 Exception class in Java 6.3 Exception handling in Java 6.3.1 ‘throw’ and ‘throws’ keywords 6.3.2 Single catch block for multiple exceptions 6.3.3 Best practices for handling exceptions 6.4 Using the try-with-resources statement
The above is a preview of the first 20 pages. Register to read the complete e-book.

💝 Support Author

0.00
Total Amount (¥)
0
Donation Count

Login to support the author

Login Now
Back to List