Java Classes đŸ§‘â€đŸ’» It’s Great to Learn!

in #coding ‱ 3 months ago

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:

@xmauron3

”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: @xmauron3 “O Futuro é IncrĂ­vel!”

Sort:  

Java has always been very difficult for me to learn, mainly because I believe it requires a lot of practice with projects. Seeing someone else’s progress motivates me. Just today, I was commenting in #inleo that I have the desire to start studying programming again

Do Not give up brother. Let’s grow together. Just now I was studying the “if, else statement” and my code was getting an error. Then I used chat gpt to help me and realized that my code was missing a “}” at the end. Sometimes things are simpler than we think. Take advantage of AI and be grateful to be living in the future.

I wish you the best !!!!

Obrigado por promover a LĂ­ngua Portuguesa em suas postagens.

Vamos seguir fortalecendo a comunidade lusĂłfona dentro da Hive.

Metade das recompensas dessa resposta serĂŁo destinadas ao autor do post.

Vote no @perfilbrasil para Testemunha Hive.