course-icon-1course-icon-23course-icon-4course-icon-5Ресурс 1c++csharpjavajavascriptМонтажная область 1phppythonswiftcodeinterviewjobresumestudentapache-tomcatbootstrapcssherokuhibernatehtmlj2eejavascriptjdbcjqueryjson-jacksonjspjunitРесурс 1postgresqlspring twitter facebook google-plus vk youtube github linkedin
Do you dream about a job with big prospects?
Do you love technology?
Become a programmer!

Three reasons to become a programmer

Programmers are in High Demand

Common professions are disappearing. Drivers, cashiers, and farmers will be replaced by robots, but the need for programmers will only grow! In mid-2015 there were 19 million developers in the world, and by 2019 companies will need at least 25 million such specialists*.

*Forecast by Evans Data Corporation (EDC).

Lots of Possibilities

You can be a part of a huge development team. Or create your own game for Android. Or start by creating a game, and then grow it into a huge project. Or build a startup and attract investments. Or... <Insert your idea here>

The Best-Paying Jobs of Today's World

A programmer's salary is significantly higher than average for the labour market, and it grows as you gain experience. Whatever country you live in, inevitable economic slumps will affect you much less.

It's good to be a programmer,
but what programming language should you choose?

We recommend Java! And here's why:

Java is the most popular language in the world

  • Numerous studies have shown this. For example, consider the TIOBE or PYPL indices.
  • It's also indicated by the fact that the Java virtual machine is installed on 9 out of every 10 computers in the United States
  • Stats on job openings on Glassdoor, Payscale, Indeed and Insights Stackoverflow confirm it

Java is the universal language

  • Most Android applications are written in Java. The Android OS is also largely written in Java
  • Most companies' web applications and services are created in Java. For example, Netflix, LinkedIn, Amazon, Google Ads…
  • The largest corporate server applications for finance and banking are also most often written in Java
  • Big Data and knowledge-intensive research are also not foreign to this language
With Java, the difficulty of learning and the demand for Java experts is perfectly balanced
Android

But what about other popular programming languages? Let's compare:

Category
Easy to learn
Highly paid
In-demand
Windows applications
Mobile apps
Websites and web applications
Big Data
Category
Easy to learn
Highly paid
In-demand
Windows applications
Mobile apps
Websites and web applications
Big Data

Java programmer's yearly salary

CitiesNo experience1 year2 years3 years4 years5 years
Seattle$40 000$60 597$60 450$79 000$90 000$110 100
San Francisco$60 000$68 172$72 819$81 000$90 000$109 902
Berlin$30 000$40 675$50 873$60 000$69 400$95 000
London$55 000$58 214$60 662$76 000$88 000$110 000
Moscow$3 600$9 000$19 800$25 800$30 000$32 400
Tokyo$20 000$32 873$40 000$42 000$60 700$105 000
Bangalore$5 454$7 273$9 000$12 000$20 700$26 000

Java is an excellent choice.
We teach it on CodeGym!

CodeGym is a popular online platform for learning the Java language from scratch. We created it to reduce the time from the start of training to your first job. Don't be scared if you have absolutely no programming experience. That won't last long.

The course is 80% practice

There are a lot of good books on the Internet, but you won't become a programmer by reading books. To become a programmer, you need to do a lot of programming. CodeGym is an online Java programming course consisting of 80% practice. That's precisely what you need to become a Java programmer.

1200 practical tasks

How many hands-on tasks would be in the perfect Java course? 10, 20, 100? The CodeGym course has 1200 practical tasks of increasing complexity. The tasks are small, but there are lots of them (lots and lots). Just enough to give you the experience you need to get a job.

500+ hours of Java programming experience

The course is divided into 40 levels. You can advance to the next level only if you have completed most of the tasks in the current level. The tasks start small and easy and progress to big and very useful. Anyone who reaches the end will have accumulated 500 hours of practical experience. That's a serious bid for victory. And for employment.

Instant task verification

Have you ever been in a situation where you submitted a task/job for verification, but then had to wait a week for the results because the verifier checking was busy? That's how it works in most full-time courses. In CodeGym, you get task verification results less than a second after clicking "Verify".

The latest teaching methods

In our day, is it really possible to learn from books alone? This approach was innovative in the 17th century, but not in the 21st. CodeGym uses the latest techniques to make your learning easier, more interesting, and productive: visualization, storytelling, motivation, gamification, and a couple dozen other techniques you've haven't even heard of.

Train Your Coding Skills in CodeGym Whenever You Need

The course is totally self-paced. You don’t have to wait a few weeks or months until the group is gathered and the course begins. Just click on the button "Start learning", and dive in the fascinating world of Java!

Registeredusers
Completedtasks
Now you're ready to learn.
Let's start the first lesson!
zapp
Java programming instruction
Java Tutorial
Level 0, Lesson 1

"Hi. If you’re reading this, I’d like you to know that yes, these are Java lessons. This course is actually chock full of opportunities for hands-on learning (with over 1200+ exercises) and is meant for adult students. I hate boring lectures. That’s why we made CodeGym an online game (in the form of quests)."

"Have you ever played games where you get to level-up your character? Sometimes you get drawn into it before you even notice, right? Do you see what I’m getting at? In CodeGym, you have to level-up your character. From Level 1 to Level 40 (and even up to Level 80, when we release the sequel). Make it through the whole course and you’ll be a first-rate Java programmer."

"Make it to Level 40, and you’ll be able to get a job as a Junior Java Developer. Some people have even been able to find a job at Level 20, since CodeGym contains so many exercises. No, really—it’s got a lot."

The game is set in the distant future – year 3017, at a time when humans share the Earth with robots and space travel is routine.

Once upon a time, a spaceship crashed on an unknown planet...

Read the back story

The Galactic Rush crew crash-landed on an unknown planet. During the crash, the spaceship slammed into a mountainside and was almost completely buried under debris. Several days were spent in futile attempts to free the ship. The crew lost all hope of returning home and started settling into this new place...

A week later, Ellie, the ship’s navigator, happened to discover that the planet was inhabited by thousands of wild robots! They could help clear the rocks and free the ship. But the robots were too primitive and stupid. They lacked the ability to do anything at all. They couldn’t even carry rocks, an ability which would have come in handy.

Professor Noodles, the mission’s chief scientist, would later recall:
"After a few days, I came up with a solution. I would take the firmware from Diego, a robot member of our crew, convert it into firmware for a bricklayer, and then load it onto the wild robots."

"But luck seemed to be against us. After looking into it, we found that the natives didn’t have any connectors for uploading the firmware. In fact, they didn’t have any connectors at all!"

"Bilaabo, the only extraterrestrial on the crew, recalled that he had once met a robot on his home planet who knew how to program. Not only that, but this robot could even fix bugs in his own firmware."

"That’s when a brilliant idea occurred to me. After all, I had once managed to teach a capable robot to program in Pascal."

"I gave orders to trap the most talented young robot and teach him how program. With his new coding skills, he would be able to rewrite his own firmware to help us out!"

In the end, we found a promising candidate. Diego suggested naming him Amigo, after the brother he’d always wanted, but never had.

"I offered to give Amigo metal beads for every month of his training and then $10 per year to clear the debris after his training. For the savages, this was generous. After all, we were enlightening them for free."

Diego later wrote in his memoirs:

"I was outraged by this blatant robbery of my fellow robot, but the whole crew sided with the professor and Rishi. So, of course, I agreed (for appearances) and offered to help teach Amigo. Ha-ha! After all, nobody can teach a robot better than another robot."

"Everybody was so happy that I was willing to help that they decided to join me in training Amigo. "


"You’ll start at level 1Your goal is to help Amigo reach Level 40. But let’s start small. Let’s first try reaching Level 2. Maybe you’ll like it so much that you’ll finish the course and get a job before you even notice. )"

P.S.

Now, let’s start learning. «Click Next lesson.

risha
The virtual machine and your first command
Java Tutorial
Level 0, Lesson 2
Риша

"Hello, Amigo! My name is Rishi. I'm going to help you learn Java."

"I'm ready to listen! "

"Very good. Let's start then."

"A program is a set (list) of commands. First, you execute the first command, then the second, then the third and so on. When all the commands are executed, the program is finished."

"What kinds of programs are there?"

"Commands depend on what is executing them. On the types of commands the actor knows (and understands)."

"You can give a command to a dog: «Sit!», «Bark!»; to a cat: «Shoo!»; to a human: «Freeze, or I'll shoot!»; or to a robot: «Work! Work, roboscum!»"

"What else?" Amigo was finally starting to have fun."

"Programs written in Java are executed by the Java virtual machine (JVM). The JVM is a special program that knows how to execute programs written in Java."

"The list of its commands is quite extensive. For example, this command could be used to display «Robots are friends to humans» on the screen."

It’s super simple:
System.out.println("Robots are friends to humans");

— O_O

"But rather than starting with commands, we’ll begin with a couple of simple principles."

"Knowing a couple of principles can replace knowledge of many facts."

"Here’s the first principle."

"In the Java programming language, each command is written on its own line. A semicolon must be placed at the end of a command."

"The program is made up of three commands:"

Программа из трех команд:
System.out.println("Humans and robots are friends forever");
System.out.println("Humans and robots are friends forever");
System.out.println("Humans and robots are friends forever");

"The second principle."

"A program can’t consist of commands alone."

"Imagine a room in an apartment. A room can’t exist on its own. It’s part of some apartment. An apartment also can’t exist on its own. It’s part of some building."

"On the other hand, we can say that the building is divided into apartments and an apartment is divided into rooms."

"Everything is clear so far."

"A command is like a room. In the Java programming language, a command can’t exist on its own. It’s part of a function (in Java, “functions” are also called “methods”). A method is part of a class. In other words, a class is divided into methods and methods are divided into commands."

"So a class is an apartment building, a function/method is an apartment, and a command is a room. Did I get that right?"

"Yes, that’s absolutely correct."

Amigo looked at Rishi in awe. This human was explaining to him the basics of programming using the divine Java language! And he, Amigo, just understood (had guessed all by himself!) that programs consist of classes, classes consist of methods, and methods consist of commands!

Amigo still didn't know why he needed it, but he was certain that this knowledge would make him the most powerful robot on the planet.


Meanwhile, Rishi went on:

"Programs in Java consist of classes. There might be tens of thousands of classes. A minimal program is one class. For each class, a separate file is created. The name of the file matches the name of the class."

"Suppose you decide to create a class that describes a home. You’ll need to create a Home class that will be saved in the file Home.java."

"If you want to describe a cat in the program, then you’ll have to create a file Cat.java and declare the Cat class in it, etc."

"The files contain code (text) on the Java programing language. Usually a class's code consists of the «class name» and «class body». The class name is written in curly brackets. This is how the Home class (file Home.java) should look:"

public class Home
{
  

Class body

  
}

"I understand so far."

"Very good. Let's go on then. The class body may contain variables (also known as «fields») and methods («functions»)."

public class Home
{
  Variable А

  Variable Z

  
Method 1
  

  
Method N
  
}

"Would you please give me an example?"

"An example? Of course! "

public class Home
{
  int a;
  int b;

  public static void main(String[] args)
  {
    System.out.print("1");
  }

  public static double pi()
  {
    return 3.14;
  }
}

"Are «int a» and «int b» variables, and «main» and «pi» methods?"

"Yep."

"Can classes exist without variables?"

"Yes."

"And without methods?"

"Yes. But a minimal program must contain at least one class that must include at least one method/function to get the program running. This method must be named ‘main’. A minimal program looks like this:"

public class Home
{
    public static void main(String[] args)
    {
    }
}

"I can see the Home class here. I can see the «main» method, but where are the commands?"

"A minimal program doesn’t contain any commands. That’s the reason it’s called «minimal»."

"I see."

"The class that starts the program can have any name, but the ‘main’ method used to start the program must always look the same: "

public class Home
{
  // invariable part
  public static void main(String[] args)
  {
    

Code for a method

    
  }
}

"I think I understand everything. At least, it seems so right now."

"Brilliant. Let’s take a little break then. Shall we have some coffee?"

"Robots don’t drink coffee. Water make us rust fast."

"What do you drink then?"

"Beer, whiskey, 100-year-old alcohol."

"That’s even better. Shall we have some beer then?"

Task
Tasks
0
Task
Tasks
0
risha
Ready for your first program
Java Tutorial
Level 0, Lesson 3

(an hour later)

"Very good. Where did we stop?"

"The code found in a method or something like that."

"Right. Exactly. The body of a method consists of commands. We could even say that a method is a group of commands that has been given a name (method name). Both statements would be true."

"There are all sorts of commands. Are there dogs on your planet?"

"Only domesticated robotic wolves."

"Do they execute commands?"

"Yes. «Bite», «Eat», «Tear» and «Good! Heel!»"

"Hmm. Nice commands! But there aren't very many of them."

"How many do we need?"

"The Java language has commands for every occasion. Each command describes some action. At the end of each command, we use a semicolon."

"Here are some examples of commands:"

CommandDescription (what it does)
System.out.println(1);
Displays the number 1 on the screen
System.out.println("Amigo");
Displays «Amigo» on the screen
System.out.println("Risha & Amigo");
Displays «Risha & Amigo» on the screen

"Actually, this is just one command - System.out.println. We use parentheses to pass arguments to the command. Depending on the value of the arguments, the same command can execute different actions."

"That's very convenient."

"Yes. If you want to display some text on the screen, you put double quotes on each side of it."

"A single quotation mark looks like this: «'». A double quotation mark looks like this: «"». A double quotation mark is not the same thing as two single quotation marks. Please don’t confuse them."

"The key for the double quotation mark is next to the the Enter button on the keyboard, right?"

"Right."

Amigo’s pulse accelerated from 3 to 5 GHz. He still couldn’t believe it. He had just learned how to print strings on the screen, and it turned out to be much easier that he had expected.
Amigo looked out the window to distract himself from his thoughts and calm down. The leaves were turning yellow. The Rusty Season is very close, he noted automatically. An illuminator let him see much further than usual. The newcomers’ technology was very advanced indeed. But did he care about the leaves now? He would multiply his knowledge again by evening!

But his thoughts wouldn’t calm down. One day, he’d write a program to make all robots take refuge in their homes during the Rusty Season. That program alone would save thousands of robo-lives…

"This command has two versions: System.out.println() and System.out.print()"

"If you use the System.out.println() command a few times, you’ll see that each time the text you pass to the command is displayed on the screen on a separate line.If you use the System.out.print() command, the text is displayed on the same line. For example:"

CommandsWhat will be displayed on the screen
1
System.out.println("Amigo");
System.out.println("Is The");
System.out.println("Best");
Amigo
The
Best
2
System.out.print("Amigo");
System.out.println("Is The");
System.out.print("Best");
AmigoThe
Best
3
System.out.print("Amigo");
System.out.print("Is The");
System.out.print("Best");
AmigoTheBest

"Keep this in mind:println doesn't start printing text from a new line. It prints text on the current line, but makes it so the next text will be printed on a new line."

"Theprintln() command prints the text on the screen and adds a special unseen «newline character». This is what makes the next text start on a new line."

"What does the entire program look like?"

"Look at the screen:"

public class Home
{
    public static void main(String[] args)
    {
        System.out.print("Amigo ");
        System.out.print("Is The ");
        System.out.print("Best");
    }
}

"Wow! All clear now. We added spaces to the ends of the words so they wouldn’t all run together, right?"

"Exactly. You’re a smart little guy."
The comment made Amigo radiate with pride.

"Great. Here is your first task."

Task
Tasks
0
Task
Tasks
0
elly
Ellie: Variables and Data Types
Java Tutorial
Level 0, Lesson 4

A gorgeous woman with pink hair entered the cabin. "I wonder if all human women have hair like this," Amigo managed to think, before quickly starting to feel a bit uncomfortable under her gaze.

"Hi! My name is Eleanor Carrey. You can call me Ellie. I'm the navigator here on the Galactic Rush."

"Hi, Ellie," Amigo willed himself to say. He had no idea why his cheeks felt hot, as if there were an oil leak somewhere inside.

"I’m going to explain the most interesting part of the entire Java language: variables."

"I'm ready to listen. What are these variables you speak of?"

"Variables are special entities used to store data. Any data. In Java, all data is stored in variables. The closest analogy here is a box."

"A box? What box?"

"Just any old box. Suppose you write number 13 on a piece of paper and put it into the box. Now we can say that the box is storing the value 13."

"In Java, every variable has three important properties: type, name, and value."

"Can you clarify what that means?"

"Sure. We use a name, so we can distinguish one variable from another. It’s like a label on a box."

"A variable’s type determines the kinds of values/data that can be stored in it.We put a hat into a hatbox, shoes into a shoebox, etc."

"The value is the specific object, data, or information stored in the variable."

"Can you tell me more about types?"

"Sure. Every object in Java has a certain type. Some examples include integer, fraction, text, Cat, House, etc."

"A variable also has a type. It can only store values whose type is the same as its own."

"You can see this in real life. Different kinds of boxes are used to store different things:"

"To create (or declare) a variable, we use the name of the type: «type name» «variable name»"

Here are some examples:

To declare a variable:
first the type, then the name.
Description
1
int a;
Create an int variable named a.
2
String s;
Create a String variable named s.
3
double c;
Create a double variable named c.

"The two most common types are integers (declared as int⁠) and text (declared as String)."

"What is a double?"

"Doubles are fractional, or real, numbers."

"You said a variable has three properties: type, name, and value. But I can only see two. So, my question is, how do you assign a value to a variable?"

"Let’s go back to our box analogy. Imagine that you take a piece of paper, write the number 42, and put it into the box. Now the box stores the value 42."

"I see."

"We use a special operation (assignment) to assign values to variables. Assignment copies values from one variable into another. It doesn’t move values, but rather it copies them. Like a file on a disk. This is how it looks:"

CodeDescription
1
i = 3;
Assign the value 3 to variable i.
2
a = 1;
b = a + 1;
Assign the value 1 to variable a.
Assign the value 2 to variable b.
3
x = 3;
x = x + 1;
Assign the value 3 to variable x.
In the next line, the value of x increases by 1, making x equal to 4

"To perform the assignment operation, we use the equal sign «=»."

"I'll say it again: This isn’t making a comparison. We are copying the value on the right of the equal sign to the variable on the left. To perform a comparison, Java uses a double equal sign «==»."

"I know how to put a cat into a variable. It’s almost like a program."

"How to Trap a Cat:"

1. Take an empty box.

2. Wait.

"No, Amigo. You can only squeeze one cat into a box. Uh, I mean you can only assign one value to a variable."

"I see. Could you give me more examples of creating variables?"

"OK. Let me repeat: to create «or declare» a variable, you need use the name of the variable's type."

CodeExplanation
1
String s;
A String variable named s is created.
This variable can store text.
2
int x;
An int variable named x is created.
This variable can store integers.
3
int a, b, c;
int d;
int variables named a, b, c and d are created.
These variables can store integers.

"Oh, now I see!"

"Keep in mind that you can’t create two variables with identical names in the same method."

"How about in different methods?"

"Yes, you can do that. That’s like having boxes at different houses."

"Can I name a variable anything I like?"

"Almost. Variable names cannot contain spaces, +, -, etc. It’s best to just use letters and numbers in a variable’s name."

"Remember that Java is case-sensitive. «int a» is not the same as «Int a»."

"By the way, in Java you can create a variable and simultaneously assign a value to it. This saves time and space."

Compact codeEquivalent but longer code
1
int a = 5;
int b = 6;
int a;
a = 5;
int b;
b = 6;
2
int c = 7;
int d = c + 1;
int c;
c = 7;
int d;
d = c + 1;
3
String s = "I'm Amigo";
String s;
s = "I'm Amigo";

"That way is a lot more compact and clear."

"That’s how we roll."

"There are two types every Java novice needs to become familiar with. int (integers) and String (text/strings)."

"The int type lets you store numbers in variables and perform operations on them: addition, subtraction, multiplication, division, etc."

CodeExplanation
1
int x = 1;
int y = x * 2;
int z = 5 * y * y + 2 * y + 3;
x equals 1
y equals 2
z equals равен 20 + 4 + 3, equals 27
2
int a = 5;
int b = 1;
int c = (a - b) * (a + b);
a equals 5
b equals 1
c equals 4 * 6, equals 24
3
int a = 64;
int b = a / 8;
int c = b / 4;
int d = c * 3;
a equals 64
b equals 8
c equals 2
d equals 6

"Got it. Is programming always this easy?"

"Actually, yes."

"Nice! So, what’s next?"

"The String type lets you store lines of text, also known as «strings»."

"To assign a string in Java, you need to place the text inside quotation marks. Here are some examples:"

CodeExplanation
1
String s = "Amigo";
s contains «Amigo».
2
String s = "123";
s contains «123».
3
String s = "123 + 456";
s contains «123 + 456».

"Got it. It doesn’t look very hard."

"Here’s one more fun fact for you."

"You can join strings together with a + sign. Look at these examples."

CodeExplanation
1
String s = "Amigo" + " is the best";
s contains «Amigo is the best».
2
String s = "";
s contains an empty string – a string with no symbols at all.
3
int x = 333;
String s = "Amigo" + x;
s contains «Amigo333».

"So, you can add strings to numbers?"

"Yes, but remember that when you add strings and numbers, the result is always a string."

"I figured that out from your example."

"If you’re so smart, try figuring out how to display a variable on the screen."

"Hmmm. A variable? On the screen? Nothing comes to mind."

"Actually, it’s simple. To display something on the screen, we use a System.out.println() command, and we pass whatever we want to print as an argument."

CodeScreen output
1
System.out.println("Amigo");
Amigo
2
System.out.println("Ami" + "go");
Amigo
3
String s = "Amigo";
System.out.println(s);
Amigo
4
String s = "Am";
System.out.println(s + "igo");
Amigo

"A-ha! That makes everything much clearer."

"Great. Here are three more exercises for you."

Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
professor
What are compilers?
Java Tutorial
Level 0, Lesson 5
Hello, Professor Noodles.

"Hi, Amigo. My name is Professor Hans Noodles. I’m head of the Scientific Council here on the Galactic Rush. I also oversee our efforts to teach you Java programming."

"Hello, Professor Noodles."

"I’d like to explain to you why Java is a very cool programming language."

"You will hear more than once that Java’s unmatched advantage is its platform independence. What does that mean, and what is it all about? Let me take a roundabout approach."

"A computer can execute only the simplest numerical commands. When training dogs, we use commands like Heel, Shake, etc. to make a dog do something we want it to do."

"For computers, numbers play the role of such commands. Every command is represented by a certain number or code (sometimes called machine code)."

But it’s really hard to write a program using only numbers, so people invented programming languages and compilers. A programming language can be understood by both humans and compilers. A compiler is a special program that converts a program written in a programming language into a series of machine codes."

A programmer usually writes a program in a programming language and then runs a compiler, which turns the program code files written by the programmer into a single file with machine code – the final (compiled) program."

Program in C++Compiler ⇨Machine code

"The resulting program can be executed by the computer immediately. The bad news is that the code of the final program strongly depends on the processor and operating system. This means that a program compiled for Windows will not work on an Android-based smartphone."

"You mean, if I write a program and compile it for Android, it won’t work on Windows?"

"Exactly."

"I see."

"However, Java uses a much more innovative approach."

Program in JavaJava compiler ⇨Special platform-independent codes (bytecode)Java VM ⇨Machine code

"A Java compiler doesn’t compile all the classes into one machine-code program. Instead, it compiles every class independently and, what’s more, not into machine code, but into a special intermediate code (bytecode). The bytecode is compiled into machine code when the program is started."

"So, who compiles the program into machine code when it’s being executed?"

"There is a special program called the Java virtual machine (JVM). It must be run first when you start a bytecode program. The JVM will compile the bytecode into machine code before it is executed."

"Interesting. Why would that be necessary?"

"It is a very powerful approach and one of the reasons for Java’s total domination."

"This approach allows programs written in Java to be run on virtually any device: computers, smartphones, ATMs, toasters, or even credit cards!"

"Cool!"

"This approach has many advantages. It’s why all Android programs are also written in Java. Thanks to the quick growth of the mobile phone industry, Java dominates the following areas of programming:"

1)Enterprise: heavy server-oriented applications for banks, corporations, investment funds, etc.

2)Mobile: mobile development (smartphones, tablets), thanks to Android.

3)Web: PHP is in the lead, but Java has captured a solid share of the market.

4)Big Data: distributed computing in clusters consisting of thousands of servers.

5)Smart Devices: programs for smart homes, electronic devices, IoT refrigerators, etc.

"Java isn’t just a language, but a sort of ecosystem: millions of ready-made modules you can use in your program; thousands of online communities and message boards where you can get help or advice."

"The more you write programs in Java, the more answers you will find to the question"

"Why Java?" That’s it for today.

"Thank you, Professor. This was really interesting and inspiring."

kim
Getting to know Kim
Java Tutorial
Level 0, Lesson 6
Ким

Wow, another human woman! With black hair this time. How exiting!

"Hi, my name is Kim."

"Hi, my name is Amigo."

"I know. I came up with your name. Diego wouldn’t have thought that up."

Amigo’s thoughts raced at the speed of electrons. Mmm… she’s so nice… I wonder if she likes robots.

"Let’s get back to the lesson. I’ll use simple words to explain the material to you."

"OK."

"I’d like to add a few words to what the Professor and Rishi said."

"In Java, you can write commands, but you can also add comments to those commands right in the code. The compiler completely ignores the comments.When the program is run, all the comments are omitted."

"Give me an example, please."

"Yes, sure."

public class Home
{
    public static void main(String[] args)
    {
        /*
        Now we'll display the phrase 'Amigo Is The Best' on the screen
        */
        System.out.print("Amigo ");
        System.out.print("Is ");
        System.out.print("The ");
        System.out.print("Best");
    }
}

"In the class’s code, we added the comment «We’ll now display the phrase…on the screen.» The beginning of the comment is indicated by a pair of symbols (/*), and the end – by (*/). When the program is compiled, the compiler omits everything between the symbols /* and */."

"Does that mean that I can write anything I want?"

"Yes. Usually comments in code are about parts of the code that are difficult to understand. Some comments consist of dozens of strings, often written before methods to describe nuances in how those methods function."

"There is one more way to add a comment to code. You can use two forward slashes //."

public class Home
{
    public static void main(String[] args)
    {
        System.out.print("Amigo ");
        System.out.print("The "); // this is also a comment
        System.out.print("Best");
    }
}

"Here, the code starting with the // and up to the end of the line with the // is considered to be a comment. In other words, there is no second pair of symbols used to “complete the comment."

By the way, some comments are really interesting.

// I’m not responsible for this code. I was forced to write it against my will.
// Honey, I’m from the future. Please forgive me for this code.
// If I see something like this once more, I’ll have a complete mental breakdown at work.
// If this condition is ever satisfied,
// please inform me for a reward. Phone: ххх-ххх-ххх.
// Dear programmer:
// When you finish “optimizing” this subroutine
// and realize what a huge mistake it was,
// please increase the count below as a warning
// for the next guy:
// Number of hours wasted = 42
// When I started writing it, only God and I knew what I was doing
// Now it's only God.
// Sometimes it seems that the compiler is just ignoring all my comments
// I dedicate all my code and my work to my wife Darlene
// who will have to provide for me, our three kids, and the dog when
// it all goes public.
// I’m drunk. Correct this later.
// This is magic. Don’t touch.

"Yes, some comments are very funny."

"That’s all for today."

"That was a short but interesting lesson. Thank you, Kim. Thanks, Kim."

julio
Nerd Break
Java Tutorial
Level 0, Lesson 7
Julio Siesta

"Hi, Amigo. I’m Julio Siesta."

"I can see that you worked hard today."

"What about a well-deserved break?"

Aren’t we supposed to have a lesson now?"

"Yes. But lessons have to be interesting, or did you forget that? Nobody every repealed the law that stipulates that boring teachers will be beaten with a stick!"

"This is a special training video that will… uh… enhance your interest in your studies and… Let’s just watch it, okay? You can ask your questions later. Roll it!"

Task
Tasks
0
Task
Tasks
0
diego
Summary of Level 0
Java Tutorial
Level 0, Lesson 8
Диего

"Hi, I’m Diego. I’m a robot just like you, but I was produced at a factory in Havana, Cuba."

"Hi, Diego."

"How has your training been going so far?"

"This is the coolest programming course I’ve ever had. No, even cooler: the best course of my life, period. It was better than anything I could have imagined."

"That’s how we roll."

"Are all the lessons this interesting?!"

"You bet. They get even better. Boring lessons are so 21st century! Can you imagine writing in chalk on a blackboard! Nothing had changed since the 1400s. I suppose there were dinosaurs still roaming the streets then."

"I agree. What’s next?"

"You’re moving to the next level. 39 to go, and then you can start looking for a job."

Today you learned about:

  • Variables
  • Displaying text on the screen
  • int and String types
  • The difference between compiling in Java and other languages
  • Adding comments in code and why we need them

"Awesome!"

"Sure thing, the levels that follow won’t be as easy as this one, but they will grow more difficult gradually. The same goes for the exercises."

"It’s like going to the gym: we add weights little by little, and 6 months later, the beginner can do 220 lbs on the bench press."

"Cool! I want them both. The bench press and a job."

"Well, since you’re so motivated, here are a couple more exercises, Don-Diego style."

Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
Task
Tasks
0
amigo-2
Excellent work, future Junior Java Developer!
Java Tutorial
Level 0, Lesson 9

"Excellent work, future Junior Java Developer! Continue your studies, and in time you'll become a true master. Save your progress by registering. Then quickly take on the next lesson."

Quick registration

or
The name cannot be empty and must contain only letters
Be sure you entered your email address correctly
Password can't be empty
By registering, you accept the terms of the license agreement

"Very good! This was your first step on the road to becoming a Junior Java Developer. Now your progress will never be lost! You'll continue your studies from wherever you leave off."

Task
Tasks
7
You will be charged -{price} units of dark matter!
You received +{price} units of dark matter!