Hey my hivean friends, here is an update of my Java lessons and how I am feeling about it.
My course is divided in 23 folders. Each one is a different Java subject. There is an average of 5 videos of 10 minutes each folder. To be honest, I am very happy to be learning it.
I thought it could be much more difficult, but I believe I was very anxious. The secret is to take it easy and not want to rush things. Now that I understand this, things are flowing much better.
As I'm already in the sixth subject (Java Classes), I couldn't wait to see how to request the user to include some information.
Example: Ask you to write a number, wait for the user's answer, and ask a new question later, to show some determinate result.
If you are interested, here are some very simple coding programs that I developed to learn these basic concepts. Remembering that there is no need hurry things up if you are a newbie, like me. I am on this journey with all of you guys!
It's very good to feel that I'm really starting to understand and feel like I am truly learning something new.
I hope you feel like me if you decide to learn Java.
This was another great post by:
”The Future is Awesome”
Portuguese 🇧🇷 Português 🇵🇹
Eai meus amigos de Hive, aqui está uma atualização das minhas aulas de Java e como estou me sentindo sobre isso.
Meu curso está dividido em 23 pastas. Cada um é um assunto de Java diferente. Há uma média de 5 vídeos de 10 minutos cada pasta.
Para ser honesto, estou muito feliz em aprender.
Pensei que poderia ser muito mais difícil, mas acredito que estava muito ansioso. O segredo é ir com calma e não querer apressar as coisas. Agora que entendi isso, as coisas estão fluindo muito melhor.
Como eu já estou na sexta matéria (Java Classes), mal podia esperar para ver como requerer que o usuário inclua alguma informação. Exemplo: Pedir para que escreva um número, esperar a resposta do usuário, e fazer uma nova pergunta depois, para assim mostrar algum resultado.
Caso tenham interesse, aqui estão alguns programas bem simples que desenvolvi para aprender esses conceitos básicos. Lembrando que não há necessidade de colocar a carroça na frente dos bois.
É muito bom sentir que estou aprendendo, e espero que você também sinta isso caso decida aprender Java.
SCANNER CLASSES JAVA
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int almond = 8;
Scanner apple = new Scanner(System.in);
// there is no difference apple int and almond. both are variables. the difference is that "Scanner" is a class.
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner apple = new Scanner(System.in);
// if you want to get INPUT from the user, we need to write (System.in)
}
}
THE USER WILL WRITE THE VALUE:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter a number");
int a = sc.nextInt();
}
}
_____________ IMPORTANT
-------------> For the user to get the results of the numbers they added, see below:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter two numbers separated by enter");
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println("you entered two number and I plus them:"+(a+b));
}
}
now, to make it easier for user, you can make 2 different separate questions after each input. Example:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter first number");
int a = sc.nextInt();
System.out.println("Enter second number");
int b = sc.nextInt();
System.out.println("you entered two number and I plus them:"+(a+b));
}
}
// As you can see, theres a "sout" (system output print) before the "integer a" and before the "integer b". This way it becomes more user friendly and intuitive to use a certain program.
_______ Lets make a division
instead of defining a number to int, like 55, for example, you write the the users choice, which is unknown.
Example:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter first number");
int apple = sc.nextInt();
System.out.println("Enter second number");
int almond = sc.nextInt();
System.out.println("You entered two numbers and I divided them:" +(apple/almond));
}
}
This was the Scanner Class. Next class is Java Operators and Arithmetics Examples.
Vamos trocar idéias e aprender juntos !
Esse foi outro ótimo post de:
“O Futuro é Incrível!”

