Useful Tips

How to become a Java programmer and connect your life with IT?

Pin
Send
Share
Send
Send


In 1991, the Green Team, a division of Sun Microsystems led by James Gosling, created a programming language for consumer electronic devices. At that time it was called Oak ("Oak"). Why "Oak"? Just because this tree grew outside the window of Gosling's office.

The Green Team demonstrated the use of Oak on an interactive TV. But for digital cable television in those years, this technology was too advanced. At the same time, the Internet was gaining popularity, for which the new programming language was best suited.

After a while, the new language was renamed to Green, and after that - in Java, in honor of coffee from the island of Java. Therefore, the Java logo depicts a coffee mug.

During the development of Java, C / C ++ was popular, so Gosling made the language syntax similar to C / C ++ and implemented the principle “write once - run anywhere” for it. In 1995, Sun Microsystems released the first official version of Java. And at the same time, it was announced that Java would be part of the Netscape Navigator browser.

In 2010, Sun Microsystems, along with the Java programming language, was acquired by Oracle.

A few facts about Java

In order not to bore you with long theoretical sermons, I grouped some information about Java into a list, after reading which you will get an insight into the understanding of what kind of language it is and what its role is in the wild programming:

Java is a "trendy" and cross-platform programming language. It works on any device with any OS. All Google and Android applications are written on it. In no other language can you find so much information and training materials,

the official language release date is May 23, 1995. Initially, it was conceived for interactive cable television, but it didn’t grow together. The inventor of Java is Sun Microsystems, which Oracle acquired in 2010,

many confuse Java and JavaScript. If you want to engage in front-end development (websites, web applications), then choose the second option. Java is the back-end, i.e. the development of the application toppings,

Javascript Fast start

Learn the basics of JavaScript with a practical example of creating a web application

it is an object-oriented programming language whose code is executed by a special virtual java machine (JVM). In the United States, about 9 out of 10 computers have this JVM installed.

the language got its name from the coffee brand - that's why the official emblem depicts an inspirational cup.

Are you still here or ran to make yourself a cup of coffee? Then we continue the conversation on how to become a Java programmer.

Software installation

Oddly enough, some people have problems already at the stage of installing the Java software environment. To do this, go to the official website of the developer company - Oracle. You will see a link to the current version at the very top of the site. You need Java SE (Standard Edition) and Java Development Kit - a set of development tools. Please note that there are different distributions for different operating systems.

Let's say we have Windows. We go into the "System Properties" and see if our system is 32-bit or 64-bit. Download a file that suits us in bit depth. If you choose the wrong distribution, you will get an error when compiling the code. After confirming the Accept License Agreement, click the download button.

What is the Java developer toolkit?

The programmer spends most of his time in the IDE (IntelliJ IDEA, Eclipse, WebStorm, NetBeans). IDE is an integrated development environment, a special interface for programming. It not only helps when writing code, but also simplifies the use of other programming tools. Some advise those who want to become a Java programmer from scratch to write their first programs in regular notepad or Notepad ++.

Maybe elementary programs should be written in the editor. But in the future, I still highly recommend using the IDE. It has functions for code completion, syntax control, transition to method definition, and many others. And smart tips will save you from having to remember all the names of the functions and their parameters, which is simply physically impossible.

When teamwork, when several people are working on the same program at once, it is necessary to use the so-called version control system (Perforce, Git, Subversion, etc.). However, version control systems are very convenient when working alone.

Sample Java Learning Algorithm

Learning the basics of the Java language. The first step is the development of logical thinking skills and the study of the fundamental concepts of the syntax of a programming language. Armed with a book, article, or instructional video, learn how to create simple Java objects that contain different behaviors based on input data using an IDE or text editor.

An analysis of the advanced features of the Java language. At this point, learn the syntax, libraries, and frameworks that are useful to you when creating more complex applications with a practical bias. A good programmer not only knows how to use various libraries, but also knows how they are arranged inside. In addition, concepts such as input / output operations, inheritance and abstractions, serialization, generic types, regular expressions, should not be an empty phrase for you.

Javascript Fast start

Learn the basics of JavaScript with a practical example of creating a web application

The subtleties of programming. In no case do not disdain a thorough study of the documentation and the jargon of Java programming. At this point, you should already “mutate” into a mature programmer. Chat with the Java gurus you will find in thematic forums and other environments where programmers gather. Show them your code, consult and advise others - “accumulate karma”. You can even start your own blog, post snippets of your own code on it and watch what more experienced programmers say about it.

Short description

The world saw the Java programming language in 1995, at the end of the 20th century it was very popular, although today it is used by more than 9 million developers. The following products are written in this language:

  • video games
  • Applications for Android
  • client-server applications and others.

Today, IT specialties can rightfully be considered the most promising area, but this segment never suffers from a personnel shortage. And, despite this, Java programmers were and will be in demand on the labor market, because these employees account for about 14% of all IT vacancies.

Profession Description

An entrant can master this complex technical profession in just 1 year while attending courses. A representative of this profession should be fluent in other programming languages, understand the structure of the product being created, and be able to work with different engines and software.

The work of the programmer who chose the Java language consists of the following steps:

  • work with customer
  • development of architecture, software modules, Enterprise Application Integration,
  • testing and implementation,
  • correction of errors if they were noticed while working with the product,
  • further technical support.

Specialists are often involved in work related to fixing errors in someone else's code, updating or modifying existing applications, translating foreign software. Note that the programmer must be able to interact with the customer and the development team, draw up technical specifications, have a good knowledge of technical English.

Classification

All Java programmers are conditionally divided into several groups, taking into account the level of their professional knowledge, individual abilities and previously implemented projects:

  • young professionals who know the basics of the programming language, but do not yet know how to put them into practice. They can work as assistants or take part in projects with a small budget and a low level of responsibility,
  • Junior Developer (Junior). He has minimal work experience, is able to correct small errors, his work is checked by colleagues, because in case of omissions, they will be responsible to the authorities,
  • developer (Java Middle). This specialist already has experience, he can independently write code that does not need to be verified, works with tasks of medium complexity,
  • Senior Developer It easily copes with any tasks, bears full responsibility for the deadlines, written code, changes made, etc.,
  • Team Leader (Teach Lead). A high-level specialist who not only writes code, but also distributes TK, controls the work of junior employees,
  • architect (Architect). The highest paid design specialist who can independently extend the entire project.

Most in demand in the labor market are developers and senior developers, whose work can be paid by small companies. Managers and architects are piece specialists who are hired by representatives of medium and large businesses.

Java Version History

  1. June 1991 - the start of the Java programming language project.
  2. JDK 1.0 - January 1996.
  3. JDK 1.1 - February 1997.
  4. J2SE 1.2 - December 1998.
  5. J2SE 1.3 - May 2000.
  6. J2SE 1.4 - February 2002.
  7. J2SE 5.0 - September 2004.
  8. Java SE 6 - December 2006.
  9. Java SE 7 - July 2011.
  10. Java SE 8 - March 18, 2014.
  11. Java SE 9 - September 21, 2017.

Java - cross-platform language

Java code written on one platform (i.e. the operating system) can be run unchanged on other platforms.

To run Java, the Java Virtual Machine (JVM) is used. The JVM processes the byte code, after which the processor processes the code received from the JVM. All virtual machines work the same way, so the same code works the same on all operating systems, which makes Java a cross-platform programming language.

Object Oriented Programming Language

There are various programming styles, and one of the most popular is object-oriented programming. With this approach, a complex problem is broken into smaller ones by creating objects. Thanks to what the code can be reused.

Object-oriented functions are found in many programming languages, including Java, Python, and C ++. If you are serious about programming, an object-oriented approach should be included in your training plan.

Java is fast

Early versions of the Java programming language were often criticized for being slow. But today the situation has changed dramatically. Newer versions of the JVM are much faster, and the processors that interpret them are getting faster.

Today Java is one of the fastest programming languages. Well-optimized Java code runs almost as fast as low-level programming languages ​​such as C / C ++ and much faster than Python, PHP, etc.

Extensive base library

One of the reasons Java is so widespread is its huge standard library. In it you can find hundreds of classes and methods from various packages that make life easier for developers. For instance,

java.lang are advanced functions for strings, arrays, etc.

java.util - a library for working with data structures, regular expressions, date and time, etc.

kava.io - library for file input / output, exception handling, etc.

Java platform application

Before learning Java programming from scratch, you need to know that more than 3 billion devices worldwide work on this platform. What exactly can it be used for:

  1. Android applications - for developing Android applications, the Java programming language is often used in conjunction with the Android SDK (from the English software development kit - software development kit).
  2. Web Applications - Java is used to create network applications using server programs, the Struts framework, and JSP. Here are some popular web applications written in Java: Google.com, Facebook.com, eBay.com, LinkedIn.com.

It is worth noting that these sites are not necessarily written exclusively in Java, and can use other programming languages.

  1. Software development - Java programs such as Eclipse, OpenOffice, Vuze, MATLAB and many others are written.
  2. Processing Big Data - to process "big data" you can use the Hadoop framework written in Java.
  3. Trading systems - using the Oracle Extreme Java Trading Platform, you can write programs for trading.
  4. Embedded devices - Based on Oracle's Java Embedded technology, billions of devices today operate, such as televisions, SIM cards, Blu-ray players, etc.

Java programming is also used to develop games, scientific applications (for example, to process a natural language), and in many other areas.

Java Terminology to Know

Java is a set of technologies (programming language and computer platform) designed to create and run software. However, the term Java often refers to the programming language itself.

The Java programming language is a cross-platform, object-oriented, general-purpose programming language with wide capabilities.

Java 9 is the latest version of Java at the time of this writing.

Java EE, Java Me, and Java SE - these names mean Java Enterprise Edition, Micro Edition, and Standard Edition, respectively.

Java EE targets applications running on servers. Java ME is designed for power-limited devices such as embedded devices. Java SE is the standard Java edition for writing regular programs.

If you are new to Java programming, we recommend starting with Java SE.

JVM - Java Virtual Machine ("Java Virtual Machine") is a program that allows a computer to run programs written in Java.

JRE - The Java Runtime Environment includes the JVM, associated libraries, and other components necessary to run programs. But there is no compiler, debugger, or other development tools in the JRE.

JDK - The Java Development Kit (Java development kit) contains JRE and other development tools such as compilers, debuggers, etc.

How to run Java on Mac OS

Here's what you need to do for Java programming from scratch and install the platform on Mac OS X or macOS:

  1. Download the latest Java version (JDK) from the Java SE download page.
  2. Double-click on the downloaded DMG file and follow the instructions of the installer.
  3. To verify the installation, open a terminal and enter the following command:

javac –version

If Java is installed correctly, the version of the program will be displayed on the screen (for example, javac 1.8.0_60).

The next step is to install an IDE (integrated development environment) for writing and running Java code. We will install the free version of IntelliJ IDEA and run Java on it. Here's what you need to do to do this:

  1. Go to the IntelliJ download page and download the free version of Community Edition.

  1. Open the downloaded DMG file and follow the installation instructions. For quick access, you can move IntelliJ IDEA to the Applications folder.
  2. Open IntelliJ IDEA. Select the “Don’t import settings” option and click “Ok.” After that, accept the Jetbrains privacy policy by clicking on the “Accept” button.
  3. Now you can customize the interface for yourself. You can also skip this step and leave everything as default. If you’re not sure, just skip this step by clicking on the “Skip All and Set Defaults” button.

  1. The program will show you a welcome page. Click on the “Create New Project” button.
  2. In the next window, select “Java” in the left pane and click “New” at the top of the program window to select “JDK”. Here you need to select the place where you installed the JDK, and then click Next.

  1. You will have the option to create a project from a template (“Create project from template”). Ignore it and click on the “Next” button.
  2. In the next step of installing the Java programming language, enter the name of the project and click the "Finish" button.
  3. In the left panel you will see your project. If the panel is not visible, go to Views> Tool Windows> Project.
  4. Go to Hello> New> Java and set the class name. We called it First.

  1. Write Java code and save the project.
  2. To start the program you just wrote, go to Run> Run ... Click on First (that is, the name of the file we created) - the program will compile the file and run it.

How to run Java on Linux

To run Java programming examples from scratch Java on Linux, you need the JAVA SE Development Kit (JDK) and IDE to develop your projects. Follow the steps step by step to get started with Java.

    Open a terminal and type the following command to install Java:

Your first Java program

To introduce users to the new programming language, use the program Hello World ("Hello world!"). This is a simple program that displays the words Hello, World! In this section, we will teach you how to write this program in Java using IntelliJ IDEA.

  1. Open IntelliJ IDEA.
  2. Go to File> New> Project ...> Java (in the left navigation bar).
  3. Set the Project Name from the J a va programming course. We will call it Hello World and click Finish.
  4. Now you need to create a new Java class.
  5. Select the src folder in the left pane, then go to File> New> Java Class and set the name of the new class to HelloWorld.
  6. Скопируйте следующий код в файл HelloWorld.java и сохраните его.

  1. Нажмите кнопку запуска ( Run ). Если всё в порядке, вы увидите на экране надпись Hello, World !

Рекомендуемые книги по Java

Если вы действительно хотите научиться программированию на Java , купите хорошую книгу. Конечно, 1000 страниц не прочитать за один день. Но хороший учебник поможет вам научиться программированию.

Java: Полное руководство (10-е издание)

Отличная книга для тех, кто только начинает изучать Java . Последнее издание включает все функции релиза Java 8 .

В книге описано всё, что нужно знать о программировании на Java , включая синтаксис, ключевые слова и фундаментальные основы программирования, а также библиотеку API Java , апплеты Java и многое другое.

Философия Java (4-е издание)

Если вы переходите на Java с другого языка программирования, эта книга для вас. Если же вы начинаете с нуля, лучше всего читать её вместе с другой.

Java 8. Карманный справочник: Скорая помощь Java-программистам

Эта книга содержит понятные ответы на вопросы, возникающие при обучении J ava программированию с нуля . Она кратко рассказывает обо всех основных концепциях Java ( включая Java 9 ). Don't want to flip through hundreds of pages looking for the right line? Buy this book.

Instead of a conclusion

If you start learning Java, make no mistake - it is a promising programming language full of a wide variety of possibilities.

Before you start learning Java, use a few tips:

  • Do not read tutorials and examples like a novel. The only way to become a good programmer is to write a lot of code.
  • If you switch from another programming language (say, C #), you do not need to write code in the style of C #.
  • Find online Java communities. When you learn how to write simple Java programs, find popular Java sites and forums. Try to solve problems that other programmers have. This is a great way to expand your own knowledge. In addition, if you have a snag, you will know where to ask for help.

We hope this article encourages you to learn Java and help you get started with your first programs.

This publication is a translation of the article “Learn Java Programming. The Definitive Guide ”, prepared by the friendly team of the Internet technology.ru project

Pin
Send
Share
Send
Send