DEV Community

Discussion on: Why Java is the best Programming language to Learn Coding for beginners?

Collapse
 
leobm profile image
Felix Wittmann • Edited

Java is easy for beginners?

Here the "Hello World" program in Java:


public class HelloWorld 
{

       public static void main (String[] args)
       {
             System.out.println("Hello World!");
       }
}

Enter fullscreen mode Exit fullscreen mode

You have to explain a lot of complex topics.

  1. What is a Class ?
  2. What is a Function ? e.g. what does this special main function ? What is args ?
  3. What does the static keyword ?
  4. What is String[] ? You have to explain Types String,Array
  5. What is System.out ? You have to explain Packages

And now in Python:


print("Hello World!")

Enter fullscreen mode Exit fullscreen mode
Collapse
 
joelbonetr profile image
JoelBonetR 🥇

There's php code:
echo('hello world'); this is just the reason for learning Java or other "more strict" languages before Dynamic ones, if you give a kid a php or python or... Similar languages it will be a mess due to non understanding of what a class is etc (and tell me how to work with Python without packages)

Collapse
 
michelemauro profile image
michelemauro

A similar answer (for the same reasons) can be given for Scala.

And when you learned Scala, you won't even need to downgrade to Java 😁

Collapse
 
petergabriel2 profile image
PeterGabriel2 • Edited

But nobody will stay with single command program.
There is not a problem if you have to explain what is the class and the object. You don't have to explain it on a first day.

Problem with Python is that that language IS NOT intuitive and you will have much worse dilema later.

After years of C# and Java and Pascal/Delphi and PHP and ... we are teaching young people Kotlin and it has never been better language for doing that.

I hope that one day Kotlin will be also more popular in AI in comparison with Python. I have tried Python but I will never be able to use to it.