What are some uses of the programming language Java?

  • #1

Summary:

I am completely ignorant of this, could you help me?

Main Question or Discussion Point

thanks
 

Answers and Replies

  • #2
Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
2019 Award
24,535
7,418
What research have you done and why isn't it satisfactory?
 
  • #3
The primary use of Java appears to be business development, particularly but not exclusively web development. Close behind would be the Android application market.

But it can be used for pretty much anything, like any other general purpose language. It will be reasonably performant, and in some cases, like string manipulation, even unreasonably performant.

Java's primary advantage is the considerable set of libraries available for use; if you need something done, somebody has written something that will do most of it. The downside to this is that Java development tends to be a hodgepodge of different libraries, each with their own logical approach to problems, which means you have to get really, really comfortable living in a tiny island of understanding in a vast sea of ignorance to get anything done; don't expect to ever understand everything going on in even a medium sized application. Everything will be a black box; inputs go in, outputs come out.
 
  • Like
Likes Anti Hydrogen
  • #4
11,794
5,400
Rather than explain it I offer wikipedia

https://en.wikipedia.org/wiki/Java_(programming_language)

and as a platform

https://en.wikipedia.org/wiki/Java_(software_platform)

and as a virtual machine

https://en.wikipedia.org/wiki/Java_virtual_machine

java is the language of choice when your app needs to run on different hardware platforms. Before Java, apps would be written in more hardware specific languages like C/C++ or assembler but while performing were considerably harder to port to other platforms. Java bridged that problem allowing developers to focus on the app and its features and less of the specifics of each platform the app would run on.
 
  • Like
Likes FactChecker
  • #5
547
284
I am completely ignorant of this, could you help me?
It would help if we knew why you've asked this question.

Has a PC dialog box popped up and said "You need Java for app XX to run"?

Has someone recommended that you learn it, or use it, or install it, or some such?

As @jedishrfu noted above, 'Java' has a number of components and they can be accessed in different ways. There are also extensions, such as Node.js, that are widely adopted for software development and have enabled large libraries of open source code.

It is generally considered a secure language and there are lots of online resources that describe it in gritty detail, so if your interest is to learn to program in Java, I'd say that's a good choice.
 
  • #7
33,631
5,285
Before Java, apps would be written in more hardware specific languages like C/C++ or assembler
Assembler yes, since each processor type has its own instruction set, but C and C++ aren't hardware specific. A given C or C++ program will run on pretty much any hardware, as long as there is a compiler for that hardware.
 
  • #8
11,794
5,400
There are still porting issues like filepaths, windowing api and other things that have been abstracted in java and that’s what I was referring to. Before java I couldn’t write an app for Windows that worked on unix or os/2 without many changes being done To the code.
 
  • #9
1,427
1,252
Besides all the points mentioned, Java is the #1 language for learning Object-oriented programming (OOP). For OOP, I haven't seen a better language till date.
 
  • #10
1,427
1,252
The downside to this is that Java development tends to be a hodgepodge of different libraries, each with their own logical approach to problems, which means you have to get really, really comfortable living in a tiny island of understanding in a vast sea of ignorance to get anything done; don't expect to ever understand everything going on in even a medium sized application. Everything will be a black box; inputs go in, outputs come out.
It's true that Java programmers depend on libraries a lot, but if you want to see the code inside those libraries, you can easily do so by using a good IDE like NetBeans. I have often done so myself; in fact, that is a great way of learning programming.
 
  • #11
547
284
Except node.js is based on JavaScript not java.
Yes, that's true. And why more detail in the OP would be helpful for us to discern what the interest actually is.
 
  • #12
Svein
Science Advisor
Insights Author
2,079
668
If there has been no change to Java in the last 20 years, it is still a language that lives in an OS world - it has no concept of hardware. Way back when (about 1998 I think), a firm that I had done some business with decided to try a software house for their latest project. They got a brand new programmer that had been weaned on Java and knew the language by heart - but the goal of the project was to scan betting sheets and send the results to a database machine.

Even with a clearly defined interface to the scanner (TWAIN, if my memory serves me right) he was totally unable to connect to the scanner. I was called in and had no trouble connecting to the scanner, but the poor guy did not even know what kind of software interface he needed. I proposed a "pipe", but he did not know the concept. I think we ended up by me creating a file in a defined directory and he reading the file. The problem was of course that he would try to read the file before I had finished writing to it and closed it...
 
  • #13
It's true that Java programmers depend on libraries a lot, but if you want to see the code inside those libraries, you can easily do so by using a good IDE like NetBeans. I have often done so myself; in fact, that is a great way of learning programming.
Sure! I primarily program in Java, and have had to debug libraries before, which requires digging in. The vast scale of available libraries isn't a problem, it is an asset. It is just an asset that requires a slightly different attitude to fully utilitize.

I have worked with hundreds of libraries at this point; it is more a matter of balancing understanding what everything is doing, versus getting things done, and in a medium sized application, you will be working with twenty to a hundred libraries. (My current single-page web application has 81 libraries, and over a hundred JAR files.). The prime culprit there is that most libraries themselves depend on other libraries, because the people making libraries are also generally working in Java, and taking as much advantage of the ecosystem as you are.

Beyond the sheer scope of the problem, the knowledge quickly becomes outdated with new major releases of those libraries, which you'll end up moving to sooner or later.

Get familiar enough to get what you need done, and move on.
 
  • Like
Likes Wrichik Basu
  • #14
1
0
Most of the top companies in the world use Java in their project. Java have the following uses :
1. Object Oriented Programming Language means everything in Java considered as Object.
2. Web development
3. You can create mobile apps .
4. Creating games like flappy bird.
 
Last edited by a moderator:
  • #15
33,631
5,285
Even with a clearly defined interface to the scanner (TWAIN, if my memory serves me right) he was totally unable to connect to the scanner. I was called in and had no trouble connecting to the scanner, but the poor guy did not even know what kind of software interface he needed. I proposed a "pipe", but he did not know the concept. I think we ended up by me creating a file in a defined directory and he reading the file. The problem was of course that he would try to read the file before I had finished writing to it and closed it...
TWAIN sounds about right as the interface to the scanner.

Regarding Java, and more specifically "Java schools," Joel Spolsky published, back on 2005, a scathing critique of colleges and institutions that primarily teach computer science using Java: https://www.joelonsoftware.com/2005/12/29/the-perils-of-javaschools-2/
Instead what I’d like to claim is that Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers.
 

Related Threads on What are some uses of the programming language Java?

Replies
3
Views
670
  • Last Post
Replies
3
Views
985
Replies
7
Views
3K
Replies
1
Views
2K
Replies
6
Views
3K
Replies
19
Views
919
Replies
13
Views
507
Replies
12
Views
8K
Top