Ask coding questions

← Back to all posts
WHY DOES NOT ANYONE POSTS ABOUT JAVA ?
HimanshuShekha4 (51)

A SIMPLE REPL MADE BY ME CONSISTING THE BASICS OF JAVA .....

Comments
hotnewtop
HahaYes (1868)

cpp > java thats why

Evanlicious (19)

I really like that you included example code from Java in this post, it actually helps a lot as I have never coded in Java before. I'll have to try it out. I primarily use Python right now, but perhaps Java would be cool to learn for Minecraft plugins and stuff.

FlaminHotValdez (750)

its bc all of the big peeps on replit use HTML/CSS/JS because it's good for graphics and crap(idk why just guessing lol) or python bc it's easy. Personally, I prefer C++, which nobody who is anybody on repltalk uses.

linanada (15)

Python is easy yes, but also very powerful and good for everything!
@FlaminHotValdez

linanada (15)

yes, but doesn't really matter
@FlaminHotValdez

Evanlicious (19)

@FlaminHotValdez Yeah, it's many times slower than Java or C++, but I've always thought human-readable code is the future, and Python is leading it. Plus, Python has a TON of modules that you can import and use. It's decently powerful, but if you need speed for something like a game then yeah, use Java or C++.

linanada (15)

@HimanshuShekha4 Just wanted to point out Java's popularity is decreasing, basically new learners go for easier languages like Python, and the people working with Java are probably too advanced to use Repl Talk. But still, Java is a cool language (and a hard one too)!

HimanshuShekha4 (51)

know this sounds crazy but ... the same can go with HTML in the future ....

TsunamiOrSumth (540)

WHY DO YOU TALK IN ALL CAPITALS

ANYWAYS I DONT USE JAVA BECAUSE I DONT WANT TO

HimanshuShekha4 (51)

@TsunamiOrSumth chill dude , no offense ... you seem to be a js guys thats why u dont wanna use java

Whippingdot (718)

Tsunami doesn't know how to code at all He knows C++ too... @HimanshuShekha4

TsunamiOrSumth (540)

@Whippingdot im mostly interested in frontend actually

HimanshuShekha4 (51)

@TsunamiOrSumth I thought i saw u commenting somewhere that translate to japanese .😐😐

HimanshuShekha4 (51)

@TsunamiOrSumth yup , thats why you took JS and all the stuff related to it

TsunamiOrSumth (540)

@HimanshuShekha4 nah i speak english, might wanna check ur grammar tho

Whippingdot (718)

Ya, he knows Japanese too. Hey tsunami, check this out:

Go here to get your own loopback
@HimanshuShekha4

Whippingdot (718)

You are tied with CSharpIsGud but i guess amasad likes you better @TsunamiOrSumth

IntellectualGuy (887)

@HimanshuShekha4 The most popular languages on repl are python and HTML/CSS/Javascript and repls of the other languages don't get notice much. I know it's sad :(

Wumi4 (552)

@IntellectualGuy Yeah. The same goes with others, like C, C++, Nim, and so on. They are excellent, but too sad it's not their time now. Maybe they will wait for years to be the elephant of Repl.it posts. Like what Golang and Rust does with the IT job title.

HimanshuShekha4 (51)

@Wumi4 c++ / c# can't die ... bcoz they are like the basic and very useful languages

HimanshuShekha4 (51)

@HimanshuShekha4 many companies still us them for designing games

Wumi4 (552)

@HimanshuShekha4 I don't say they are dead, I just say that they are not popular in Repl.it.

Also, there are other languages for game developers to choose besides C/C++, Lua is pretty dominated the game engines (and embedded) industry because of its simplicity, and many like Python, Rust, Golang.

And also, C/C++ is popular for making games, not designing games.

HimanshuShekha4 (51)

@Wumi4 😁😁 ok man .... no offense ,just chill

xxpertHacker (931)

@HimanshuShekha4 C++ / C# can and will die... eventually.

Just give it time.

xxpertHacker (931)

@HimanshuShekha4 C++ and C# will be considered poor languages eventually (I already think that they are).
Why don't you see Pascal in use very often? It died.
Same goes for a bunch of other languages.

Whippingdot (718)

It will die but I hope it stays alive in my lifespan. Or else when it dies I am left with Python, HTML/CSS/JS, and Elixir. @xxpertHacker

HimanshuShekha4 (51)

@xxpertHacker yeah I think ur right ....😥😥

xxpertHacker (931)

@Whippingdot C++ was my first language, I hope it dies :)
Just learn other languages, there's plenty of better ones.

Nim, Haskell, Go, Rust, V, etc.

Whippingdot (718)

noooooooooooooooooooooooo C++ is very good for game dev. I want to do game dev in the future. That is why I am learning C++. I have used lots of my time to learn C++. What will replace it. 😥😥😥😥😥 @xxpertHacker

Whippingdot (718)

My guess, C++ and C will stay as very basic languages, meaning old languages, and it will be used to create Games still in the future. Python will die off pretty soon or it will stay alive just for beginners to learn something. C++ and Java are very similar you know? @xxpertHacker

HimanshuShekha4 (51)

@Whippingdot absolutely right bro ,( I finally got some one supporting my statement ) they are the very basic languages and cant die actually the languages hanging from the cliff are i think swift - rust - ruby(already dead) and ..... pearl(dead and buried underground)

HimanshuShekha4 (51)

@Whippingdot nothings gonna replace it man , dont worry ....
it's a very useful language

xxpertHacker (931)

@Whippingdot C++ and Java aren't similar, lol.

xxpertHacker (931)

@Whippingdot Think C# is used for game dev too.
Also, I didn't say soon, but eventually.

Whippingdot (718)

C# and C++ are very popular for game dev. Tho I prefer C++. I haven't started doing game dev tho, after I learn to do complex programs, then I will start using unreal engine. Can you create unreal repls? I thought C++ and Java were very similar... @xxpertHacker

HimanshuShekha4 (51)

@Whippingdot c++ and java are similar(almost)

IntellectualGuy (887)

@xxpertHacker Is go a frontend language or a backend language?

xxpertHacker (931)

@IntellectualGuy Go is a programming language, if you're talking about front-end & back-end from a web-development perspective, Go can be either.

xxpertHacker (931)

@Kookiez C++ is a poor language, C is worse.

C is only good for interfacing with assembly.
C++ has name mangling, meaning it's not even good for that.

Eventually, people will catch on that even Go is better for productivity than C++

Baconman321 (1115)

@xxpertHacker LOL I thought you liked C++.
Also, yes C++ isn't practical for programming because the average programer doesn't need (and generally doesn't want) to redefine everything (ok that's more ASM, but still C++ is pretty low level too).

I actually want to make a web server in C++ just for fun.

I made my portfolio repl in golang and I really like it.

C just seems old in general and is like the shy kid at the back of the class. No one really interacts with it anymore.

xxpertHacker (931)

@Baconman321

I thought you liked C++

No, I honestly don't like anything.

C just seems old in general and is like the shy kid at the back of the class. No one really interacts with it anymore.

C is more like the old person who has Covid and should die already.

Kookiez (417)

@xxpertHacker so why are you using C++ for the backend for codepoint?

xxpertHacker (931)

@Kookiez Because, I know the language very well.
But I know it well enough to know the bad parts too.

programmeruser (618)

@xxpertHacker C is still widely used for low level systems programming e.g. operating system kernels.

xxpertHacker (931)

@programmeruser Yes ik, but it's won't be forever.

Assembly languages are still used for low-level systems programming too, but it doesn't mean that the same assembly languages have been, or will be, used forever.

programmeruser (618)

@xxpertHacker if you want to write a bootloader, assembly is the only choice you have.

xxpertHacker (931)

@programmeruser Of course, but there are different assembly languages and instruction sets, just as there are other programming languages.

FlaminHotValdez (750)

@xxpertHacker C++ is very good for competitive programming due to its speed, which is rivaled only by Pascal and C.

FlaminHotValdez (750)

@Baconman321 Yeah, but C++ is good for competitive programming, hence why I use it a lot.

xxpertHacker (931)

@FlaminHotValdez Rust can easily have better runtime speed.

C++ isn't the language that you can get whole program optimizations from.

No one uses C++ for performance because the language itself provides the tools to write blazingly fast code, they use it to exploit the compiler optimizations.

Don't believe me?

Go write a vectorized loop, using SIMD and threading.
You don't, the compiler is expected to optimize normal code into that stuff :/

Just use the -O0 compiler flag and suddenly, C++ isn't that great anymore, same applies to C.

FlaminHotValdez (750)

@xxpertHacker Yes, but the biggest programming contests, like USACO, Codeforces, etc don't allow Rust, and C++ is among the fastest available options.

xxpertHacker (931)

@FlaminHotValdez Wait, they deny certain languages? Wow, okay.

FlaminHotValdez (750)

@xxpertHacker Yeah. Go look at the problems in USACO, they only allow submissions in Python(versions 2 and 3), C, C++, Java and Pascal. The time limit for cases for Java and Python is actually extended due to their slowness compared to C, C++ and Pascal, sadly no one uses Pascal.

xxpertHacker (931)

@FlaminHotValdez Sounds like one ought to use Java for the time, and treat it like C for better GC performance and runtime performance.

FlaminHotValdez (750)

@xxpertHacker Ya, but sometimes other languages are more convenient, for example Python has a function that converts decimal to binary, which saves a lot of time(Might not sound like it matters but you're under a time limit), but it's happened more than once to people I know that their Java/Python code doesn't run fast enough despite using the correct algorithm to solve the problem.

xxpertHacker (931)

@FlaminHotValdez Couldn't you just convert the number to a string and then use Integer.parseInt?

FlaminHotValdez (750)

@xxpertHacker It's just an example, but in practice any language is fine, but sometimes one language is more convenient than another, although the contest admins/problem makers advise to use C++ for most contests.

linanada (15)

Not when Python is right there, because c++/c# are hard, so not many people are ready to commit for it, while python is easy, useful, and powerful all at the same time...
@HimanshuShekha4

linanada (15)

Python will not die before a more powerful language takes over, Python is not only a trend, it's extremely powerful for advanced stuff (data science, blockchain...), but also easy and friendly for beginners.
@Whippingdot

linanada (15)

100% agree, they are also very hard to learn!
@xxpertHacker

linanada (15)

Yah, too bad, pascal is very good
@FlaminHotValdez

InvisibleOne (3263)

Well, I have three reasons why I don't use Java
1. I never learned it because Python was easier for me at the time
2. To print something in java you have to do: System.out.println which is a lot harder then just typing print or put or console.log
3. It always seems to run slow, I don't know if that is just me or what

IntellectualGuy (887)

@InvisibleOne No it's the same for me, it takes way to long to run

InvisibleOne (3263)

Yeah, I prefer Python anyways, I don't know of anything that Java can do that python can't @IntellectualGuy

HimanshuShekha4 (51)

@InvisibleOne you are right , I am also a python developer but my uncle told me that python is like an automatic car (gearless car) ......but you first need to learn to drive with gears ... (now coming back to the point) java is a very light language and it can handle huge programs with ease though it helps us get a deeper understanding about programming ... thats why i would suggest java along with python ....

IntellectualGuy (887)

@HimanshuShekha4 I like java too, I mean it's very organized in meaning of object oriented programming, but it can be heavy in the syntax, for example to get user input you have to have 4 lines of code. @InvisibleOne If you use eclipse java (like I used to) there is an autocomplete for System.out.println

InvisibleOne (3263)

Still, Python does object oreinted programming and Ruby is great at it @IntellectualGuy

InvisibleOne (3263)

And you are right @HimanshuShekha4 You do need to learn to drive a stick with programming, and eventually I will have to learn Java because the college that I plan on attending only teaches Java for their programming degrees.

programmeruser (618)

@HimanshuShekha4

automatic car (gearless car) ......but you first need to learn to drive with gears ... (now coming back to the point) java is a very light language and it can handle huge programs with ease though it helps us get a deeper understanding about programming

You first need to learn to drive without gears to learn the fundamentals of programming, before driving with gears.
And still Java is still a large abstraction over languages such as C or C++ where you have to manually manage memory.

EpicGamer007 (1794)

@InvisibleOne java is verbose yes but the thing is, it is way faster than python lol. it just has to compile

programmeruser (618)

@EpicGamer007 C++ is less verbose and faster then Python and Java, and also has OOP. Maybe people choose Java because of of having to do manual memory management? (Rust also has the same advantages as C++, but it doesn't have OOP, which its structs replace nicely).

EpicGamer007 (1794)

@programmeruser i mean, java does handle the low level stuff. and it is quite easier to do stuff, at least imo

xxpertHacker (931)

@programmeruser
@EpicGamer007
With std::string, std::make_unique, std::make_shared, and other automatic memory stuff, C++ wins over even Java.

Except that... maybe C++ compiles a bit slow.

HimanshuShekha4 (51)

@EpicGamer007 yes java is faster than python .....

HimanshuShekha4 (51)

@programmeruser sure is .. but , I can do it now (maybe)

Whippingdot (718)

I thought C++ was fast, if it compiles slowly that means it isn't too fast right? @xxpertHacker

HimanshuShekha4 (51)

@InvisibleOne it's not actually slower than python ....

HimanshuShekha4 (51)

@InvisibleOne thats bcoz java programmers are considered to have a deeper understanding of programming than most of the other programmers

HimanshuShekha4 (51)

@Whippingdot no bro , it is very fast just it takes time compiling on repl.it ..... 🤔🤔

xxpertHacker (931)

@Whippingdot C++ is fast at runtime, not compile time.

It's like... a racecar... that's slow to startup.
Yes, you'll win the race, but everyone else will have already gotten in a few laps by the time it starts moving. And if a compiler error occurs, well then... time to fix it and recompile, all over again.

C, Rust, V, etc, all compile way faster than C++, plenty of languages are safer than C++, and a few languages can get better runtime performance than C++.

Whippingdot (718)

Yeah but the racecar wins the race at the end right? That means that in the end, C++ is faster. @xxpertHacker

HimanshuShekha4 (51)

@Whippingdot yup , in terms of speed python cannot beat c++

xxpertHacker (931)

@Whippingdot

Yeah but the racecar wins the race at the end right? That means that in the end, C++ is faster.

Sometimes, but like I said if there's a bug...

Also, it doesn't win short races where it needs to stop often.

Also, sometimes it crashes because of how unsafe it is. Can't win if you crash :/

Whippingdot (718)

Looooool. What do you mean it crashes. I have been coding for a year and I haven't coded too complicated programs yet. Meaning I don't know too much. One thing I know is that C++ is used to make Windows, and many popular games. If it crashes then how...and why...?! Also bugs... very true. If the bug gets into the car you will get bitten and you will crash. @xxpertHacker

xxpertHacker (931)

@Whippingdot
One thing I know is that C++ is used to make Windows

Also bugs... very true. If the bug gets into the car you will get bitten and you will crash.

Yes, Windows think of bluescreen of death.

Here:

Also, check my pins, they're good examples too.

Whippingdot (718)

I don't understand what that code snippet is supposed to mean/do. Also, I will check your pins out now, one sec. D o you have a GitHub account? I want to invite you to the GitHub org for Repl.it coders. We have 16 17 by now. @xxpertHacker

xxpertHacker (931)

@Whippingdot That snippet crashes. And it's in C++. A number of languages wouldn't allow that code to compile.

Whippingdot (718)

Hey, the program outputs nothing, but if I use a cout before returning and print something random the printing works. @xxpertHacker

xxpertHacker (931)

@Whippingdot It should cause a segmentation fault.

FlaminHotValdez (750)

@InvisibleOne not only that it executes code slow too, but python is even slower.