I have to learn Java for my Computer Science degree. College meme aside, what is Java good for, why wouldn't you use C++. Java seems fucking useless and everyone in my class agrees.
I have to learn Java for my Computer Science degree. College meme aside, what is Java good for...
Other urls found in this thread:
please do the needful sir
and apply to your nearest DURGASOFT training center
and become a WEAPON OF JAVA
There have been 0 anime featuring Java. That should tell you everything you need to know.
java programs write themselves and they do it quick
Not sure what you mean lol
My thoughts exactly
I AM JAVA
>Not sure what you mean lol
Writing java programs takes little time and is easy (with performance being the tradeoff)
Scala.
Performance isn't even bad, it's just not as fast as it can possibly be
>why wouldn't you use C++
If you actually knew how much of a pain in ass managing a c++ project can be you wouldn't be asking this question.
That's why I'm asking
Are you actually interested in getting good? If so it doesn't fucking matter what language you're using, it's the paradigms behind that language that matter.
Learn the concepts behind what you're doing, then you'll be able to transition to any other language you want to without any issues.
Don't focus on "learning java", learn how to program.
I'm mainly focusing on the paradigms and what I can apply to other languages. I am improving my skills overall, I was just wondering how seriously I should take Java.
okay then.
1)Java programs can have multiple entry points so testing in java is way easier. In c++ you'd probably have to rely on pre processor hacks to achieve the same thing.
2)Java actually has a proper package system unlike c++ with its shitty header system
3)A pure java project doesn't really need build scripts or a build system. Usually you can build it in one command.
4)Java's speed is relatively decent for general purpose computing. So the small assignments you get in class are a perfect fit for this language.
C++ on the otherhand is absolute cancer to set up properly. Choosing a build(c++ has multiple build systems in use most popular is CMAKE) system and setting up a build scripts alone could take a few days.
C++ is NOT worth the hassle,for small school assignments,where you probably only have less than a week to submit.
Makes sense, thank you. I'll consider it for some personal projects and see how I like it.
>it's just not as fast as it can possibly be
Eh, outside of a few specialised cases, this hardly matter.
Hello i am want DURGASOFT SENSEI TO BECOME WEAPON OF JAVA
BECOME A WEAPON OF JAVA AT DURGASOFT ACADEMY
Based
>lame java muh C++ better!
why dont you learn both?
if you are going to be a programmer it just a benefit to know both of them
android studio for example its just java and xml
m8, if you don't know a basic interpreted language well yet, you have no chance of getting c++.
java exists because it can use a runtime environment so you run the same software on multiple systems. That sounds like a basic things in this day and age, but java was created about 30 fucking years ago. The better question is why not move to something else that is both approachable and portable: because academia doesn't have a codified body of knowledge from the industry to guide itself.
>C++ is NOT worth the hassle,for small school assignments,where you probably only have less than a week to submit.
C++ is just as good as Java and teaches you more deeply about how computer works on the inside (pointers, memory allocation). And you don't need any build scripts for small school assignments. Everything can be in one file. I personally think that the best path is C => C++ => Java.
That said...
It doesn't really matter what language you learn as your first. A good programmer / computer scientist should eventually know several languages anyway. The most important thing is to acquire algorithmic thinking which is then transmissible anywhere.
i hear it works every where
It's hilarious that CMAKE's documentation is almost useless and most advancrd knowledge about it is folklore passed onwards by a few autists on irc
It's amazing
Why waste your time programming in C++ when you can get the job done in half the time in Java?
C++ is for systems programming and video games.
NOOOO MR BABU GET DOWN THEY ARE SHOOTING AT YOU AGAIN
bullshit, there's a scene from oreimo where kuroneko is using eclipse
it's pretty simple to pick up
the standard library is huge, so your professors can actually ask you to do something interesting beyond terminal output without needing to install so-and-so library or target a specifc OS, Java is installed everywhere and is fairly easy to install
it's widely used if you want a job
and hell, it's not even particularly slow
my big issue at the moment is that Java doesn't have C# style get/set and that's it
Java added the var keyword so you don't need to type SomeLongClassName slcn = new SomeLongClassName(); which removed one of the other annoying warts I had (and to be fair, your IDE can take care of that).
They just chose a language that doesn't bore you with the details in the same way that C/C++ does
Distributing bytecode that runs across platforms without having to distribute the source code or compile for multiple targets
They opinion of your classmates means less than nothing. They are students trying to sound smart by hating on something.
Java is an easy to learn and use language. It's very easy to be productive in Java. Lots of real world code is written in Java. Knowing Java will help you get a job. Java is related to other languages like Kotlin and Scala.
Learning your first one or two languages is difficult. Once you've learned enough, picking up a new language is a couple days effort. Focus on learning and understanding now. In the future, you'll be able to use whatever silly meme language you want and your job permits, and you'll find that what you learned before helps you learning going forward.
Ultimately, if you struggle to implement programs, that's because you are dumb. It's no fault of Java.
It's good for looking at for two seconds, and then realizing C# is the better version of it you should be using
C# does seem comfy from what I’ve heard of it. I have a grey hat C# ebook. Might have to get the time set aside to go through it
because it takes 100 years to write c++ code effectively and reliably
It's really damn comfy, wonderful standard library, nowadays becoming cross platform as fuck, LINQ, good 3rd party libs, good frameworks for whatever task you need, it's my go to
t. not a shill
>ctrl f
>only one mention of native Android development
That's literally the best reason to learn Java. Sure, most apps are written in Kotlin now, but you still need a strong grasp of Java fundamentals and how the interop works to be successful writing Kotlin.
Good point, and as you'll only be allowed to learn one language, ever, it's absolutely imperative that you make the right choice now.
>everyone in my class agrees.
Well that settles it then.
fuck off lying java shill
I mean, it's Eclipse, but not Java you're right
jvm
In a few specialized cases Java can be better than C++ performance-wise.
>because academia doesn't have a codified body of knowledge
I thought it was because Java is more like C++ than say, Python.
Also it's not interpreted, unlike CPython; it's JIT-compiled.
Lmao this has been my experience with most build systems.
The same can be said for Gradle. Their DSL changes so frequently and their docs are so poor that everything is just a hand me down hack that you pray works.
Unironically, Java is mostly a wonderful language with actual improvements over C++.
Interfaces, enum classes, clean (i.e. invisible) pointer syntax, (for the most part) great standard library, well thought-out functional programming capabilities.
C++ doesn't even come close on these points.
What I really hate about Java is the slow application startup which is probably the primary reason I would never use it for personal projects.
It's also really annoying when writing tests. Have tests which run in Java seems fucking useless and everyone in my class agrees.
I don't think usefulness is important when it comes to programming in college.
>what is Java good for
Finding a job.
>inb4 faggots explaining why $language is so much better at this and that and therefore Java is shit
There are anime about programming? Or that even have a scene about it? What language, C++? Python?
>what language?
Lisp, of course. There might be others.
imagine compiling your code for every cpu architecture that its going to run on
imagine needing a runtime for every platform that its going to run on
>Interfaces
exists in C++
>enum classes
enum exists
>clean (i.e. invisible) pointer syntax
reference and smart pointers
> great standard library
except iostream, standard C++ lib is ok and I'm not only talking about stl
>well thought-out functional programming capabilities
lambdas are easier and "smarter" than java lambda and are easier to optimize for compiler.
Template are turing complete and recursive, take a look at Curiously Recursive Template Pattern for compil time polymorphism or expression template.
>C++ doesn't even come close on these points.
Java stole these features from C++...
You don't know what you're talking about.
>everyone in my class agrees
This is inevitable in every compsci degree when you first get forced to use an OOP language, because college style formal OOP is absolute fucking cancer and completely useless (outside of the very important use-case of huge businesses with giant codebases)
designated shitting language
>well thought-out functional programming capabilities
Literally nothing in Java is remotely functional, Java's "lambdas" don't even have closures for fuck's sake.
Yep ... Drugasoft are your companion only sir
I just ported some javafx software I wrote to c++, and will probably delete this last java code and forget the language. g++ can be compiled for all interesting platforms (arduino is even g++) and wxwidgets works across windows, linux and mac. Last I checked bringing up normal javafx desktop apps on even a raspberry pi would have been difficult - so it isn't very cross platform.
imho c++ may be a very complex language, but it is just as fast to code in as anything else. Recently I've done database, networking, and gui in c++ and plan to start using it for deep embedded on riscv. Hell, I've even played a little with webassembly. So c++ goes from deep embedded to browser front end. Everything else is a meme. Java being cross-platform is a meme.
When i don't want C++ performance and python isn't really enough.
>formal OOP
How did this even become a thing in the first place. The original OOP community is unanimous that it's absolute cancer and it seems to have just fallen out of "learn how to MODEL THE REAL WORLD with the latest and best paradigm" books and tutorials divorced from any actual understanding of anything that universities just seem to have picked up.
Java is boring, which is likely why most young people dislike it. Once you come into the real world, though, you find out there's quite a few strong upsides to it, such as:
>The JVM is slow to startup, but after that it is VERY fast for many business use cases, possibly faster than C in some circumstances.
>Being so popular with enterprises means the ecosystem has many useful and very reliable libraries and tools for many common purposes
>The strictness and (some of) the verbosity of the language actually helps when reading code from other people, and that's what you're most likely to spend most of your time doing on a day-to-day basis.
>Abundant workforce means the project won't be late because that one guy who's great with Prolog got hit by a bus.
Not that Java is without its flaws, of course. Even then, those are well known and are being (albeit slowly) addressed. Use Java 11.
Java is good to know because there's a bunch of shit written in it, and it exposes you to the concepts they want to teach you.
They had to choose a language. If it had been C++, you and the two classmates you talked to would be bitching about it not being in C.
Learning a programming language is rarely a waste. The more you learn, the easier it is to pick up new ones.
OOP is appealing to schools because it avoids that coding is just typing random shit until the result you want happens
Because c++ jobs dont exist
This exactly, at least it's possible to compile, if there's no JRE for the platform I want, I'm fucked.
C# is a little better but Microsoft ecosystem is a nightmare. Core 1.1 breaks framework. Core 2.2 breaks 1.1. Core 3.0 breaks all of the above. Ill stick to the stability of spring. Net is way too immature
I've just always had it in my head that C & C++ are the fastest and Python is good if it does what you need and performance doesn't matter.
Learn D, or Scheme instead.
Write a source to source and submit its outputs.
They are the fastest in terms of performance, but they're low level languages - meaning actually writing code will be way slower.
The best reason to learn Java is because it's basically identical to C#, which is used for many applications. In general, the style of those two languages is applicable for many others.
>slow application startup
GraalVM
So Java itself isn't used a whole lot? I understand the concepts are important and apply to basically everything, I just don't like the JRE and VM stuff, it seems pointless.
>They are the fastest in terms of performance, but they're low level languages - meaning actually writing code will be way slower.
Only maybe. Yeah c and c++ can get you down to the register level weeds, but if you are doing high level work the abstractions you are working with depend on the libraries you use. Java has always had extensive libraries to work with, but as c++ has matured, so have its libraries.
I can't think of a single area where there exists a Java library where a similar level of abstraction c++ library does not exist. Syntactically Java and c++ are not worlds apart - so again it just comes down to the libraries you are using and the experience you have with the language.
Java has its problems but good luck writing scaleable Enterprise systems in c++.
Does Java have any usefulness in web development? Or is that a relic of the past.
Play Framework (using Scala)
Spring is huge (and the learning curve starting from scratch can be quite steep), but it's great once you discover all the incantations to make it do what you want
>C++
it's good for decoupled development
>useless
Have you even looked a "most used programming languages" chart?
I cannot imagine doing my work with c++; just a fucking nightmare.
Minecraft modding
1 is false, you can make more entry points by using extern. Mostly agree on the other points
There seems to be some Java in the first episode of Knights & Magic though.
youtube.com
At minute 1:00 the scrolling lines of code seem like Java to me.
Because not everything needs the micro-management C and C++ provide. Java abstracts a lot of the "hard" stuff so that your project is easy to write and deploy.
Plus, the ecosystem is the most well-developed out of any programming language in existence. Literally anything you want to tackle has a framework in Java.
not eclipse.
I have a friend taking a computer science course and I need that meme where he's crying in the chair with the world of Warcraft and the waifu
I want to pound the fat slug.
You can compile Java to machine code. Maybe instead of falling for memes do some research.
Because Java programs run on virtual machines, you can more easily just ship precompiled executables and not worry about what platform the user is on.
looks like an old version of VS
What platform are you using that doesn't have a jre but has a compiler for whatever language you're using?
>java programs write themselves
No. They get copypasted off stackoverflow. It's not quite the same, but close.