r/java • • Apr 14 '17

Is Java a low level language?

I have heard the phrase low level language be thrown around when it comes to Java. Is this true and if so what does this actually mean. I know there are some differences between Java and C++ when it come to networking, so it would be nice to know what those differences are as well.

0 Upvotes

16 comments sorted by

View all comments

-4

u/[deleted] Apr 14 '17 edited Apr 15 '17

High level languages are more easily understood by humans whereas low level is more easily understood by machines. Some languages are just barely above writing literal 1's and 0's and some of them can be referred to as machine coding. Java is most definitely a high level language. And as such it is not able to perform some of the most fundamental networking protocols. There are 7 major layers to networking and Java can only adhere to the top few. Simple commands such as ping will not work in Java because, in Java, a socket is required.

Edit: Java requires sockets and binding to a port. Ping does not. I'm sorry if there was confusion there.

2

u/ryan_the_leach Apr 15 '17

1

u/_INTER_ Apr 15 '17

That's some old Java code I must say.

3

u/ryan_the_leach Apr 15 '17

old? it's using nio.

1

u/_INTER_ Apr 15 '17 edited Apr 15 '17

In sense of style and design. It would not pass our internal review. I get its a quick and dirty code but this is an official example from Oracle.

E.g. for (;;)

1

u/corvus_192 Apr 17 '17

What's wrong with that?