Java programming lessons

Antipyretics for children are prescribed by a pediatrician. But there are emergency situations for fever when the child needs to be given medicine immediately. Then the parents take responsibility and use antipyretic drugs. What is allowed to give to infants? How can you bring down the temperature in older children? What medicines are the safest?

A. N. Vasiliev “Java Tutorial with Examples and Programs” Science and Technology, 2011, 352 pages (46.0 mb. djvu + 1.34 mb. files)

Tutorial, like any other tutorial, is focused on quick and independent study on its subject, in this case, on the Java programming language (this should be understood as technology).

It is not worth talking a lot about how by reading books: manuals, tutorials, textbooks, you can become a programmer - all this is not so. Learning a programming language, like learning a foreign language, requires not only theoretical knowledge - obtained from books, but also practical exercises. Preferably with native speakers (draw conclusions).

As you noticed, the full title of the book is “Java Tutorial with Examples and Programs”, that is, it is understood that the reader will study not only theory, but also perform practical tasks and examples. Which is not a guarantee, but a key guarantee of the likelihood of success for more or less decent programming, in particular in Java.

It is up to you, the reader, to judge whether the author succeeded in the task or not. Just as not everyone can become a mathematician, so not everyone can become a programmer (more precisely, a great programmer, although ... even bears are taught to jump into the ring).

In one archive there is a book, in another there are listings with program code for practical work, the Java distribution kit with the Java development environment (NetBeans) has been removed from the archive to reduce its size, you can download their latest versions separately.
ISBN 978-5-94387-937-1


NetBeans Download Page


About the book, language and software 9
JAVA 9 technology
Software 11
About OOP in general and JAVA in particular 20
Useful Resources 23
Book 24 Structure
Terminology and conventions 25
Feedback 25
Acknowledgments 26

Chapter 1. First program 22
Very simple program 27
Another simple program 36
Resume 39

Chapter 2 Variables and Basic Data Types 41
Base Type Variables 41
How to declare variables 43
Wrapper classes 47
Resume 50

Chapter 3 Basic Operators and Type Casting 51
Arithmetic Operators 51
Logical operators 52
Comparison operators 54
Bitwise Operators 54
Ternary Operator 57
Assignment operator 59
Explicit Casting and Automatic Type Extension 60
Literal types 62
Abbreviated Forms of Operators 63
Increment and decrement 64
Expression evaluation and operator precedence 65
Resume 66

Chapter 4 Control Instructions 67
Conditional statement IF 67
Selection statement SWITCH-CASE 76
WHILE and DO-WHILE loop statements 80
FOR 85 loop statement
Resume 90

Chapter 5 Creating and working with arrays 91
One-Dimensional Arrays 91
Assigning and comparing arrays 97
2D arrays 98
Array initialization 102
Working with arrays 103
FOR Loop Operator to Loop through Array Elements 108
Resume 109

Chapter 6 Classes and Objects Classes and Objects 111
Declaring a class and creating an object 113
117
Constructors 122
Overloading Methods and Constructors 125
Object Assignment 130
Making a copy of an object 132
Resume 136

Chapter 7 Subtleties of working with objects 137
Static fields and methods 137
Objects and Methods 143
Arrays and Objects 149
Anonymous objects 153
Internal classes 156
Arguments command line 160
Resume 164

Chapter 8 Inheritance, Interfaces, and Packages 165
Fundamentals of Inheritance 165
Subclass constructor 169
Overriding Methods 172
Private members of class 177
Superclass Object Variables 180
Abstract classes and interfaces 182
Packages and access levels 193
Resume 195

Chapter 9 Working with text and other utilities 197
Working with text 197
Working with Date and Time 209
Math Utilities 210
Resume 212

Chapter 10 Handling Exceptions 213
Exceptions and their types 213
Exception Handling 216
Creating Custom Exception Classes 222
Resume 227

Chapter 11 Multithreaded programming 228
Implementing Streams in JAVA 228
Main stream 230
Creating a child thread 233
Thread Synchronization 238
Resume 244

Chapter 12 I/O system 245
Data streams and console input 245
Formatted output 249
Working with files 256
Resume 265

Chapter 13 Graphics in Java. Fundamentals of the SWING library, principles for creating applications with GUI 266
Creating a simple window 271
Window with text label 273
Window with text and icon 275
Window with label and button 277
Event classes 282
Resume 286

Chapter 14 GUI Applications 287
Create a window with text field input 287
301 Component Class Inheritance
Resume 315

Chapter 15 Applets 316
Basic Applet Properties and a Simple Example 316
Passing Arguments to the Applet 323
Control Applet 328
Resume 349
Conclusion 350

Download technical books for free 7.61 mb. epub

In the previous lessons, to display information on the console, we used the methods print() and println(), which output strings or numbers without any formatting. We could implement elementary formatting by adding extra spaces or other characters to strings. In this lesson, we will get acquainted with methods that will open up new possibilities for us to string formatting in java.

array (English array) it is an object that stores a fixed number of values ​​of the same type. In other words, an array is a numbered collection of variables. The variable in the array is called array element, and its position in the array is given by index. For example, we need to store 50 different names, you see, it is inconvenient to create a separate variable for each name, so we will use an array. The numbering of the array elements starts from 0, and the length of the array is set at the time of its creation and is fixed.

I have been programming in Java for 7 years now. But at work, you often have to train a new generation. In this regard, I decided to make some cheat sheet, which, I hope, will be useful for Habrchan. If someone can help supplement the information from this article with something, then write! So:

Essential Resources for Initial Learning

  • www.javable.com - a site with articles and a tutorial on Java. Everything is mostly in Russian.
  • www.exampledepot.com - a very useful resource, which contains brief examples of using classes for certain packages
  • java.sun.com - you can't do without the original source. For any Java programmer, JavaDoc should be the ultimate truth. Also here you can find a series of tutorials on all possible topics.

Basic Java packages

Below is a list of Java packages that a programmer should be fluent in. It is recommended to get acquainted with them both by JavaDocs and with the help of www.exampledepot.com. All packages are arranged in the recommended order for study. So:
  1. java.lang is the foundation of the basics. Each class in this package needs individual attention.
  2. java.io - no program can do without I/O operations.
  3. java.util - The package basically contains everything you need to work with collections: Collection, Enumeration, Set, List, Map, etc. etc.
  4. java.net - contains the main classes for working with the network.
  5. java.text - everything you need to format text
  6. java.lang.reflect - Java wouldn't be Java if it wasn't for Reflection. Reflection blurs the line between data and code.
  7. javax.sql - everything you need to work with databases
  8. javax.xml.* , org.w3c.dom.* , org.xml.sax.* - working with XML is simply unthinkable without these packages

Resources to broaden your horizons

  • onjava.com - sooner or later, all the news from the Java world ends up here
  • www.javaspecialists.eu - a resource useful for both beginners and advanced programmers, as it contains many articles about the intricacies of working with Java.
  • www.theserverside.com - It is recommended to subscribe to the RSS, as very interesting things about Java often slip through.

Java Libraries Everyone Should Know

Java doesn't end with just knowing the features of the JSDK. To feel comfortable, you need to know about a dozen or two third-party libraries used by Java programmers everywhere. So let's start with the basics:
  • Commons Lang - what is "forgotten" to include in the JDK
  • Commons Math is a great addition to java.math
  • Commons Logging - logging must be competent. For System.out.println to display logs, novice programmers should chop off their hands after a week of training.


Support the project - share the link, thanks!
Read also
cockfight game rules cockfight game rules Mod for minecraft 1.7 10 watch recipes.  Recipes for crafting items in Minecraft.  Weapons in Minecraft Mod for minecraft 1.7 10 watch recipes. Recipes for crafting items in Minecraft. Weapons in Minecraft Shilling and sterling - the origin of words Shilling and sterling - the origin of words