Showing posts with label Commands. Show all posts
Showing posts with label Commands. Show all posts
Use constants rather than numbers - declaring variables with FINAL statement
Suppose the government hired you to create an application that, among other things, examines whether a citizen is adulthood or not.
How would you do this conditional test?
if (age> = 21) or who knows ... if (age > 20)?
Both correct, but absolutely not recommended.
In this article we will teach an important lesson in Java: Do not use numbers, but constant.
Self-reference with this and How to invoking Classes and Objects methods
In the last tutorial related to Java Object Orientation, we talked about creating constructors, with or without parameters, in our classes.
In this small class, we will learn how to reference members of an object through the keyword 'this', which is a tool widely used by programmers in Java methods within classes.
In this small class, we will learn how to reference members of an object through the keyword 'this', which is a tool widely used by programmers in Java methods within classes.
Marcadores:
Commands,
Methods,
Object Oriented
Java Video Lessons - using loop and control statements WHILE, FOR, DO WHILE and SWITCH
This video is from the New Boston project: http://thenewboston.org/ , made by Bucky Roberts.
We just find the best Java video lesson for your.
In this video tutorial, Buckey will teach us more about the loops and control statements in Java.
We already explained about this in:
Marcadores:
Commands,
Flux Control,
Statements,
Video lessons
The FOR loop for Arrays: the for each loop
Throughout you Java programmer career, you will use the common for control statement to iterate through all the elements of an Array.
If this is so important and used, it should have a shortcut or easier way to do this in Java, don't you think?
And yes, there is a simple way.
Not to mention that with conventional arrays and for loop, it is quite easy to roll up and make mistakes.
Learn a special way to use the loop and stop having problems: foreach loop
Marcadores:
Array and ArrayList,
Commands,
Flux Control
Math Class: constants, main methods and calling methods from other classes
Let us study an important class, the Math Class, which comes several mathematical functions that will help us greatly in our complete an free Java course.Allied to this large and powerful class with our Methods section, we'll learn how to use the methods that are declared in a different class that we're making the call.
The return statement:obtaining information from methods
In this section of Progressive Java course will show you how to use the serve and return statement in methods.Problems involving control statement: if, else, while, for, do while and switch
Say 'use it' or 'use it' is easy.
Now test your creativity Javeana and invent your own way to solve the following problems, but remember to use:
to exercise your learning.
Marcadores:
Basic,
Commands,
Exercises,
Statements
The command switch: making choices in Java
In the article about the while loop in our online Progressive Java course, we show how to create a simple menu.
But Java has a specific feature for this purpose, which allows us to choose something, depending on what we typed, is the command switch.
Marcadores:
Commands,
Flux Control,
Statements
The break and continue commands: interrupting and changing flows and loops
In this part of our online Java Course we will see the break and continue commands, Java, which serve to provide us with greater control over the flow of applications, especially the iterations of loops.
Marcadores:
Commands,
Flux Control,
Statements
Subscribe to:
Posts (Atom)