Showing posts with label Data Structure. Show all posts
Showing posts with label Data Structure. Show all posts
Arrays Class: Learn how to handle (copy, sort, search and manipulate) Arrays
One of the great advantages of programming in Java is that it provides us a tremendous amount of APIs. We mean, Java comes with many classes and methods ready to be used.
In this tutorial in our online and free Java course will learn to use the Arrays class and its main methods, ordering, comparing, look, put elements in arrays / vectors of utilities among other series.
Marcadores:
Array and ArrayList,
Classes,
Data Structure
Arrays in Methods: pass by value and pass by reference
We saw in our Java course that there is a section just for methods, and we are in another section of the course just to arrays.
There are two important things, and the interaction between them is also important.
However, there are some details that need to be clarified and commented that we'll see in this article.
Marcadores:
Array and ArrayList,
Data Structure
Multidimensional Array or Matrix: Array of arrays
You saw in the last Java tutorial of our course that an array is a set of variables of the same type.
However, we could also declare a set of arrays. In this case, we would have a multidimensional array or multidimensional vector, also known as matrices.
Marcadores:
Array and ArrayList,
Data Structure
Data Structures in Java
Data Structures in Java: Array and ArrayList
00. Data Structures types in Java01. Arrays in Java: how to declare, use and access its elements
02. The FOR loop for Arrays: the foreach loop
03. Multidimensional Array or Matrix: Array of arrays
Video lesson: Arrays and Multidimensional Arrays
04. Arrays in Methods: parameter passing by value and by reference
05. Arrays Class: Learn how to handle (copy, sort, search and manipulate) Arrays
Marcadores:
Data Structure
Arrays in Java: how to declare, use and access its elements
In this introductory article of Arrays of our online Progressive Java course, you will learn how to declare and use arrays, or vectors, in Java.
Learn, too, the important notation of brackets, [], which we use to treat the members of an Array, as well as access the elements through these brackets.
Marcadores:
Array and ArrayList,
Data Structure
Introduction to Data Structure Types in Java
So far, in our online Progressive Java Course, we are declaring the types one by one, do you remember?
Maybe not, because it is something normal for you.
Imagine the following situation: you've been hired to create a Java application to a college, where there are more than 2 thousands students.
Among other things, you have to create types - float, probably - to store students' grades, integers to store the missed classes, strings for the names etc..
So, you will declare thousands of variables? One by one?
No! Learn data structure.
Marcadores:
Data Structure
Commented and explained code of Minesweeper game in Java
We will now explain in detail how to do, and understand all program logic of a minesweeper game in the Java programming language.
The game code is on our last article of our online course Java:
Game: How to make a Minesweeper in Java
Marcadores:
Apps,
Data Structure,
Games,
Methods,
Object Oriented,
Statements
Battleship game in Java: How to program
Now, that we already learned how to pass arrays (of any size) for methods, we can do something more useful. Let's do the famous game called naval battle, in text mode.
We use everything we have learned so far in our Java course: if else, while loop, loop, methods, random numbers, arrays, multidimensional arrays and creativity.
Marcadores:
Apps,
Array and ArrayList,
Data Structure,
Flux Control,
Games,
Methods,
Statements
Subscribe to:
Posts (Atom)