4 options
Introduction to programming : learn to program in java with data structures, algorithms, and logic / Nick Samoylov.
- Format:
- Book
- Author/Creator:
- Samoylov, Nick, author.
- Language:
- English
- Subjects (All):
- Java (Computer program language).
- Computer programming.
- Physical Description:
- 1 online resource (689 pages)
- Edition:
- 1st edition
- Other Title:
- Learn to program in Java with data structures, algorithms, and logic
- Place of Publication:
- Birmingham ; Mumbai : Packt, 2018.
- System Details:
- text file
- Summary:
- Get a solid understanding of Java fundamentals to master programming through a series of practical steps About This Book Enjoy your first step into the world of programming Understand what a language is and use its features to build applications Learn about a wide variety of programming applications Who This Book Is For Introduction to Programming is for anybody who wants to learn programming. All you'll need is a computer, internet connection, and a cup of coffee. What You Will Learn Understand what Java is Install Java and learn how to run it Write and execute a Java program Write and execute the test for your program Install components and confgure your development environment Learn and use Java language fundamentals Learn object-oriented design principles Master the frequently used Java constructs In Detail Have you ever thought about making your computer do what you want it to do? Do you want to learn to program, but just don't know where to start? Instead of guiding you in the right direction, have other learning resources got you confused with over-explanations? Don't worry. Look no further. Introduction to Programming is here to help. Written by an industry expert who understands the challenges faced by those from a non-programming background, this book takes a gentle, hand-holding approach to introducing you to the world of programming. Beginning with an introduction to what programming is, you'll go on to learn about languages, their syntax, and development environments. With plenty of examples for you to code alongside reading, the book's practical approach will help you to grasp everything it has to offer. More importantly, you'll understand several aspects of application development. As a result, you'll have your very own application running by the end of the book. To help you comprehensively understand Java programming, there are exercises at the end of each chapter to keep things interesting and encourage you to add your own personal touch to the code and, ultimately, your application. Style and approach This step-by-step guide will familiarize you with programming using some practical examples.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Dedication
- Contributors
- Packt Upsell
- Table of Contents
- Preface
- Chapter 1: Java Virtual Machine (JVM) on Your Computer
- What is Java?
- Basic terms
- History and popularity
- Principles
- Java platforms, editions, versions, and technologies
- Platforms and editions
- Versions
- Technologies
- Java SE Development Kit (JDK) installation and configuration
- Where to start
- The page with Java installers
- How to install
- Main Java commands
- The JVM execution command
- The compilation command
- Command jcmd and other commands
- Exercise - JDK tools and utilities
- Answer
- Summary
- Chapter 2: Java Language Basics
- The basic terms of Java programming
- Byte code
- Defects (bugs) and their severity and priority
- Java program dependencies
- Statements
- Methods
- Classes
- The Main class and the main method
- Classes and objects (instances)
- Java classes
- Java object (class instance)
- Class (static) and object (instance) members
- Private and public
- Static members
- Object (instance) members
- Method overloading
- Interface, implementation, and inheritance
- Interface
- Implementation
- Inheritance
- The java.lang.Object class
- The equals() method
- The hashCode() method
- The getClass() method
- The toString() method
- The clone() method
- The wait() and notify() methods
- OOP concepts
- Object/class
- Encapsulation
- Interface (abstraction)
- Polymorphism
- Exercise - Interface versus abstract class
- Chapter 3: Your Development Environment Setup
- What is the development environment?
- Java editor is your main tool
- Source code compilation
- Code sharing
- Code and test execution
- Setting the classpath
- Manual setting
- Searching on the classpath.
- IDE sets the classpath automatically
- There are many IDEs out there
- NetBeans
- Eclipse
- IntelliJ IDEA
- Installing and configuring IntelliJ IDEA
- Downloading and installing
- Configuring IntelliJ IDEA
- Exercise - Installing NetBeans IDE
- Chapter 4: Your First Java Project
- What is a project?
- Definition and origin of project
- Project-related terms
- A project's life cycle
- Creating a project
- Creating a project using a project wizard
- Maven project configuration
- Changing IDE settings at any time
- Writing an application code
- Java package declaration
- Creating a package
- Creating the MyApplication class
- Building the application
- Hiding some files and directories
- Creating the SimpleMath class
- Creating methods
- Executing and unit testing an application
- Executing the application using the IDE
- Creating a unit test
- Executing the unit test
- How many unit tests are enough?
- Exercise - JUnit @Before and @After annotations
- Chapter 5: Java Language Elements and Types
- What are the Java language elements?
- Input elements
- Types
- Comments
- Identifiers and variables
- Identifier
- Variable
- Variable declaration, definition, and initialization
- Final variable (constant)
- Reserved and restricted keywords
- Reserved keywords
- Restricted keywords
- Separators
- Semicolon "
- Braces "{}
- Parentheses "()
- Brackets "[]
- Comma ",
- Period ".
- Ellipsis "...
- Colons "::
- At sign "@
- Primitive types and literals
- The Boolean type
- Integral types
- Floating-point types
- Default values of primitive types
- Primitive type literals
- Reference types and String
- Class types
- Interface types
- Arrays
- Default value of a reference type
- Reference type literals
- String immutability
- Enum types.
- Passing reference type values as method parameters
- Exercise - Variable declarations and initializations
- Chapter 6: Interfaces, Classes, and Object Construction
- What is an API?
- Java APIs
- Command line APIs
- HTTP-based APIs
- Software component API
- Interface and object factory as API
- Object factory
- Reading configuration file
- Using the json-simple library
- Using the json-api library
- Unit test
- Calculator API
- Adding static methods to API
- The API is complete
- Overloading, overriding, and hiding
- Interface method overloading
- Interface method overriding
- Interface static member hiding
- Class member hiding
- Instance method overriding
- Instance method overloading
- This, super, and constructors
- Keyword this and its usage
- Keyword super and its usage
- Constructors
- Final variable, final method, or final class
- Final variable
- Final method
- Final class
- Exercise - Restricting a class instantiation to a single shared instance
- Chapter 7: Packages and Accessibility (Visibility)
- What is importing?
- Structure of the .java file and packages
- Single class import
- Multiple classes import
- Static import
- Access modifiers
- The accessibility of a top-level class or interface
- Access to class or interface members
- The constructor's accessibility is the same as any class member
- Data hiding and decoupling
- Flexibility, maintainability, and refactoring
- Reusability
- Testability
- Exercise - Shadowing
- Chapter 8: Object-Oriented Design (OOD) Principles
- What is the purpose of design?
- The project's feasibility
- Requirement gathering and prototyping
- High-level design
- Detailed design
- Coding
- Testing
- A roadmap to a good design.
- Encapsulating and coding to an interface
- Taking advantage of polymorphism
- Decoupling as much as you can
- Preferring aggregation over inheritance
- So many OOD principles and so little time
- Exercise - Design patterns
- Chapter 9: Operators, Expressions, and Statements
- What are the core elements of Java programming?
- Operators
- Arithmetic unary (+ -) and binary operators: + - * / %
- Incrementing and decrementing unary operators: ++
- Equality operators: == !=
- Relational operators: <
- >
- <
- = >
- =
- Logical operators: ! &
- |
- Conditional operators: &
- &
- || ? : (ternary)
- Assignment operators (most popular): = += -= *= /= %=
- Instance creation operator: new
- Type comparison operator: instanceof
- Preferring polymorphism over the instanceof operator
- Field access or method invocation operator: .
- Cast operator: (target type)
- Expressions
- Operator precedence and evaluation order of operands
- Operator precedence
- Evaluation order of operands
- Widening and narrowing reference types
- Widening
- Narrowing
- Widening and narrowing conversion of primitive types
- Methods of primitive type conversion
- Boxing and unboxing between primitive and reference types
- Boxing
- Unboxing
- Method equals() of reference types
- Using the implementation of the base class Object
- Overriding the equals() method
- Using the identification implemented in the parent class
- The equals() method of the String class
- The equals() method in wrapper classes of primitive types
- Exercise - Naming the statements
- Chapter 10: Control Flow Statements
- What is a control flow?
- Selection statements
- Iteration statements
- Branching statements.
- Exception handling statements
- if
- if...else
- if...else if-...-else
- switch...case
- while
- do...while
- for
- for enhanced
- for with multiple initializers and expressions
- Branching statements
- Break and labeled break
- Continue and labeled continue
- return
- Exception handling statements
- throw
- try...catch
- Checked and unchecked (runtime) exceptions
- throws
- Custom exceptions
- What is exception handling?
- Some best practices of exception handling
- finally
- Assert requires JVM option -ea
- Exercise - Infinite loop
- Chapter 11: JVM Processes and Garbage Collection
- What are JVM processes?
- Loading
- Linking
- Initialization
- Instantiation
- Execution
- Garbage collection
- Application termination
- JVM architecture
- Runtime data areas
- Classloader
- Execution engine
- Threads
- Extending the Thread class
- What is daemon?
- Running threads extending Thread
- Implementing Runnable
- Runing threads implementing Runnable
- Extending Thread vs implementing Runnable
- How to execute the main(String[]) method
- Using IDE
- Command line with classes on classpath
- Command line with a .jar file on classpath
- Command line with an executable .jar file
- Responsiveness, throughput, and stop-the-world
- Object age and generations
- When stop-the-world is unavoidable
- Exercise - Monitoring JVM while running an application
- Chapter 12: Java Standard and External Libraries
- What are standard and external libraries?
- Java standard libraries
- java.lang
- java.util
- java.time
- java.io and java.nio
- java.sql and javax.sql
- java.net
- java.math
- java.awt, javax.swing, and javafx
- Java external libraries
- org.junit
- org.mockito.
- org.apache.log4j and org.slf4j.
- Notes:
- Description based on print version record.
- ISBN:
- 9781788834162
- 178883416X
- OCLC:
- 1042325965
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.