top contributors since
ruiwenge2
HazTheWaz
thesephist
jajoosam
mat1
HackermonDev
eankeen
TrueXPixels
HarperframeInc
cgjml
view leaderboard →
h
1 year ago
Wildest programming language ideaWhat is your wildest programming language idea? This could be fun (silly) ideas or really cool and useful ones. Go! Also on le twatter: https://twit
Ask
807 comments
Latest comments
awesomecds77 days ago
how about this : a code that uses WORDS (simalar to LOLCODE) but only words lol Screenshot 2021-09-14 8.43.14 AM
HayIsForHorses9 days ago
Not too crazy, but what if you had opposite syntaxes? I'm gonna leave the replies to give some examples, but here's a short one: "hello" = world print("hello") // Output: world while i < 11: i-=1 //this would add i+1 until its greater than 11 EDIT: Found a slightly crazier idea....have to use morse code to type everything.
LordPython40414 days ago
try leet... \/4R x = "7#15 15 50/|\3 73x7" \/4R '/ = SO 1f '/ >= SO { |*R1|\|7{x}; } This is the same as: var x = "This is some text" var Y = 50 if Y >= 50 { print{x} }
view all ›
h
3 years ago
Guide to Asking Coding QuestionsGuide to Asking Coding Questions Why? Good questions help your question be solved faster, and people will want to answer your question Bad question
Ask
177 comments
Latest comments
MikeW32 months ago
repl.it/feedback and repl.it/bugs are broken links
[deleted]
3 months ago
Is stackoverflow useful?
P0GCHAMPB0i3 months ago
What if I acidently delete my account that has important stuff?
view all ›
1 year ago
How do I convert a repl.it to a pdf?is there a way to convert repl.it to a pdf?
AskJavaJava
comment
9 months ago
WHY DOES NOT ANYONE POSTS ABOUT JAVA ?_A SIMPLE REPL MADE BY ME CONSISTING THE BASICS OF JAVA ..... _
AskJavaJava
121 comments
Latest comments
codingjlu7 months ago
@HimanshuShekha4 I'm an avid Java coder!!
Evanlicious8 months ago
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.
HahaYes9 months ago
cpp > java thats why
view all ›
answered
6 months ago
Whaaaaaaaaaaat?!?!?!im confused please help me my mom is super upset im confused please help me my mom is super upset im confused please help me my mom is super upset im
AskJavaJava
13 comments
Latest comments
MythEdits6 months ago
It legitimately tells you your error and how to fix it. This is pure laziness what the hell is up with the description for this post anyways? Making it sound urgent or making yourself look like a fool?
thethermometer6 months ago
smh why don't you just read your errors? It legit says it needs a semicolon after System.out.println(). Every statement in Java needs to end with a semicolon, unlike great Python. By the way, your not using Swing so just create a Java project. Also, if you want to print literally cat - 1, put quote. Otherwise, if you want to do math, don't put quotes,
[deleted]
6 months ago
Hey there! NovaCodes is here to help you...! Fix the following: Put a ; after lines 61 - 64 Put the array in line 121; like ['yes'] If I helped you, please mark me as correct!
view all ›
6 days ago
How to parse a scanner?I want to know how to parse the scanner
AskJavaJava
11 comments
Latest comments
CoderGautamYT6 days ago
Not sure what you mean by parse, your program seems to be working for me..
view all ›
2 years ago
How to Submit an AssignmentI want to have my students submit an assignment. Logged in as a Student, I do not see the Submit Button referenced in posts and in videos. Has that
AskJavaJava
comment
answered
1 month ago
Nth root errorI am trying to get the nth root, but whenever the button is clicked in says NaN could someone please help.
AskJavaJava
10 comments
Latest comments
Coder1001 month ago
not sure what your problem was but it works for me: image nan usually happens with things like 0/0.
view all ›
2 years ago
Jar filesIs it possible to include jar files in project classpath directory? Have a class project I would like to import along with classes contained in jar
AskJavaJava
4 comments
Latest comments
MOHAMEDSulai8 months ago
how to add jar file in java?
BrianWillem2 years ago
Jar files can be uploaded to your project the same as other files. I put my jar files into a "jars" folder that I create in my repl. From that point, you can compile and run your code from the command line: javac -classpath .:./jars/* -d . Main.java java -classpath .:./jars/* Main If you want to configure the "Run" action, you can define a .replit file in your project and add the following line. run = "export CLASSPATH=\".:./jars/*\"; javac -d . Main.java; java Main" Configure these commands
view all ›
2 years ago
how do i embed the program into a website?Every time I try to open the embeded program in my website, the program won't load, it worked the first time i tried but since that happened it wont l
AskJavaJava
11 comments
Latest comments
AdCharity2 years ago
Repl.it has protections against iframes, along with other main sties like Google and Discord. Basically you can't embed it. You should be able to embed some repl code though...
SixBeeps2 years ago
That icon means that frame has crashed. Mind linking the repl for the webpage (or providing the code that embeds your repl)?
view all ›
answered
1 month ago
No operationIt works fine if it has set double values, but when you can pick it I can't get past System.out.println("Enter the operation"); it closes after than a
AskJavaJava
3 comments
Latest comments
fuzzyastrocat1 month ago
I'm not a Java expert, so I can't tell you exactly why this is the case, but change System.out.println("Enter the operation"); String operation = sc.nextLine(); to System.out.println("Enter the operation"); sc.nextLine(); String operation = sc.nextLine(); It might be because the last sc.nextDouble() doesn't catch the final newline in that input (you type the number and then a newline, but sc.nextDouble() might not catch that), so it "bleeds over" into the next input and thus causes the result o
view all ›
answered
1 year ago
How do I fix a "Could not find or load main class Main" error?Screenshot 2020-08-24 at 11.10.26 AM Screenshot 2020-08-24 at 11.10.38 AM
AskJavaJava
3 comments
Latest comments
PattanAhmed1 year ago
@SHANEKASNER Hi, It seems like your code that you have written should be transferred to file name called Main.java Try! Thanks! Hope this helps
Coder1001 year ago
Hello, two ways: Copy all your code into Main.java Configure the run button: Create a .replit file: run="sh main.sh" Create a main.sh file: javac ExpressionsWithLiterals.java RectangleArea.java java ExpressionsWithLiterals `
CodeLongAndPros1 year ago
Your code needs to be in Main.java
view all ›
2 years ago
how to transfer code to githubi m suffering for code transfer to github how to give extension or how to manage
AskJavaJava
2 comments
Latest comments
codingjlu7 months ago
@nikhilsir786 You can download a file as a zip and upload it to GitHub. image
a5rocks2 years ago
follow https://repl.it/talk/learn/Using-Custom-Compiler-Switches/14487, but instead of running a compile command, run the git commands (git init, git set origin ..., etc.)
view all ›
1 year ago
I keep compiler exit status 1Just begging with Java, experimenting with user input via keyboard, but the code isn't getting past compiling, any idea why? idk
AskJavaJava
8 comments
Latest comments
PattanAhmed1 year ago
@sprintokflash Hi Gingrbred, I think on line 2, you have entered your class name as UserInput. To solve the error you have to change your second line code to this:- I.E Main public class Main That's it. Thanks! Hope this helps
Coder1001 year ago
ok, your class is named wrong. Your file name is called Main so your class should follow suit. public class Main { `
Coder1001 year ago
exiting status is not an error, that's an action performed by java because of an error.
view all ›
answered
9 days ago
bashI want to make a bash script so if you run it, it will join a room, but also if I go to shell I can still pick a room. the code I use to run it is jav
AskJavaJava
8 comments
Latest comments
Coder1009 days ago
use read compile it here ... javac GroupChat.java read -p "room ip? " room java GroupChat $room note replit only hosts 0.0.0.0
view all ›
2 years ago
How do i check who is shared with my repl?I wanna check who i've shared this with incase of fraud! long story
AskJavaJava
5 comments
Latest comments
Grify2 years ago
Explain long story? You can see manual shares in the Invite tab and share link uses in your notifications
view all ›
answered
h
5 months ago
Repl share buttonDoes anyone know where the "share" button went in Repl. I have students working in Repl, and I want them to be able to share an assignment with me bu
AskJavaJava
13 comments
Latest comments
Bookie05 months ago
So you want them to be able to share a link with you that of their repl, where you can't edit it? Just press the URL and copy it, or type cmd-lctrl-l` and then copy it. Screen Shot 2021-05-04 at 9.45.07 AM You'll be taken to the spotlight page where you can't edit, but can view and run their code. You can suggest an easier feature in feedback here. Good luck! :D
InvisibleOne5 months ago
the share button is gone for me as well, but you can still just go to the share space and then add a post from there.
AestraDev5 months ago
Hello there ricklaven well I don't remember replit share button 2 months ago but according to your question if you want to share or collaborate in another repls check the top right corner there will be an invite button like this image below and will help in inviting others also if you don't like to invite by using email just copy link at bottom and give to them you can regenerate link if you think its leaked thank-you 20210504_173930
view all ›
1 year ago
what method do I use to get a single char to complete the statement. Is there one?, in C it was _getchar, if I recall. I just want to type in 'w' or similar and get the code to process that statement and do the next th
AskJavaJava
10 comments
Latest comments
image why is the system.in.read
DorshReal1 year ago
There are some problems in this code: You are using the hasNext() method, which is more favourable in a recursive nature if you want to continue receiving input, suitable for a while loop instead of an if statement You are using the read() function in conjunction with System.in along with the wrong input class (Scanner). Use a buffered reader instead to access read() method, or just replace it with in.nextChar() Why are you using a char to hold a string input? A name contains more than one chara
SuperUser1111 year ago
What are you trying to do? If you simply want to print out what they entered, use this code (it's in java): `try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){ final String name = br.readLine(); System.out.println("Your name is: "+name); }` With some formatting that should work. If that wasn't what you were looking for then could you explain it to me? Thanks
view all ›
answered
h
11 months ago
Setting node.parent.left or node.parent.right doesn't remove the node from the treeHey all, I'm working on an assignment that's due tomorrow, but I've been stuck on this one bug in particular. I have a BST Node class which holds ref
AskJavaJava
24 comments
Latest comments
mwilki711 months ago
It looks like the parent node only carries a copy of the parent node at creation. image (it was null before it even reached the left = null statement)
techde11 months ago
Does it work now after u updated the code???
techde11 months ago
When you do getRoot() it is replicating it and then getting it, DynamicSquid is correct, doing setNode() will work but you need to specify how it returns the node it's a copy of the original, so set the Node using setNode(), then specify which root to get, for example, use path.getRoot, and set the path with `System.out.println("Root Path: " root); `, credits to geeks for geeks:https://www.geeksforgeeks.org/path-getroot-method-in-java-with-examples/ give Dynamic quid t
view all ›
8 months ago
flower gardenCreate a class that stores an ArrayList of Strings. The Strings store 2 bits of information about flowers. The Strings store a count and a name. Yo
AskJavaJava
4 comments
Latest comments
Coder1008 months ago
Remember that s1 on line 27 is an array. Did you maybe mean return s1[0]; Maybe you want to change the function signature instead?
view all ›
5 months ago
Boolean Parenthesization problem using memoisationProblem statement- ( https://www.geeksforgeeks.org/boolean-parenthesization-problem-dp-37/ ) I am unable to solve the problem using Map in java can An
AskJavaJava
11 comments
Latest comments
CodeMaster0075 months ago
Cool!
SaunakNandi5 months ago
I am new to Map so plz make it easy for understanding
view all ›
1 year ago
Help With CodeHey guys, so in the project I'm working on, I'm having trouble with lines 588-606; They aren't running properly... @jakman You are the best Java coder
AskJavaJava
28 comments
Latest comments
Jakman1 year ago
Sorry that i did not get the notification. My id is @Jakman not @jakman. Could you please tell me the problem with your program when you run it? And what is it you are trying to do?
EpicGamer0071 year ago
I cannot answer your question unfortunately but currently, there is an error: image
Highwayman1 year ago
Would you mind being more explicit as to what the troubles are that your having? And maybe also what you expect to happen.
view all ›
1 year ago
How do you run a (Java) *.jar file in repl.it?How do you run a (Java) *.jar file in repl.it?
AskJavaJava
1 comment
Latest comments
EpicGamer0071 year ago
You have done everything right(I think) but there is an error because it could not find the main class. Probably because the was no manifest.txt. Check to make sure the jar works on your computer first. If it does not work, then the problem is with the jar, not repl.
view all ›
answered
1 year ago
Please help me debugI'm not very familiar with the replaceAll and .length functions in Java. If it is possible, please help me as soon as possible. Thank you!
AskJavaJava
3 comments
Latest comments
Baconman3211 year ago
I know basically nothing about java. However, I looked up length quickly. There are two types of length keywords. ".length()" is used for string objects only, while ".length" is used for arrays. replaceAll() needs 2 parameters. The first one is the character you are searching for. On line 57, you may want to use "account" instead of account. The second parameter is what you want to replace the character that it finds with. For instance: String replace = "hello world"; replace.replaceAll("l","e")
view all ›
1 year ago
Anyone know how to force a player to wear a skin in mine craft in 1 world using Java/ Java Script.I am working on a project I have due by next Sunday.Most of my searches were a utter failure,and others only mentioned installing plugins and mods.
AskJavaJava
3 comments
Latest comments
AV4CAD01 year ago
I can replace the head of a player with any other player's head using commands and stop them from being able to remove it if that's any help to you... /replaceitem entity @p armor.head minecraft:player_head{SkullOwner:"playerName",Enchantments:[{id:binding,lvl:1}]} `
SixBeeps1 year ago
Nope, that's not possible. Players' skins can only change if they change it themselves (in vanilla)
CodingCactus1 year ago
be really mean to them in real life, and say that you will be nice if they wear a certain skin in a Minecraft world :)
view all ›
2 years ago
Creating and running a public classWhy does my public class SecondClass not run? Do I always have to use public Main? What if I want to create and run a public class?
AskJavaJava
2 comments
Latest comments
vedprad12 years ago
You can only run the Main class. If you want to run another class, you have to use Objects.
Geocube1012 years ago
I can't seem to see or find your code, but the Main.java file must contain a Main class and a main function for it to run. You can create other classes and run them from main though.
view all ›
2 months ago
ArrayList and ArrayI am trying to make an averager, but first of all 1.I am trying to get the size of the stuff array I made and .length and .size didn't work 2. It says
AskJavaJava
comment
1 year ago
How do I save this code as a .java fileI need to know how to save this and share
AskJavaJava
1 comment
Latest comments
SixBeeps1 year ago
image
view all ›
2 years ago
Java Import Errors / External Libraries (Jsoup) StuffSo I tried to import a Jsoup project I wrote into repl but I'm not sure how external libraries and repl work. I found the jsoup class folder from http
AskJavaJava
3 comments
Latest comments
[deleted]
2 years ago
I’m not sure, but I think you have to lowercase all the Ts.
view all ›
answered
2 years ago
KickingMy friend James needs some help with his code. He is wondering how he kick someone out of his code. Pls sent help to my fellow friend. This guy got hi
AskJavaJava
2 comments
Latest comments
Highwayman2 years ago
Click on the invite button, click change join link, then click the x next to the name of the person who you want to kick.
a5rocks2 years ago
Fork the repl, and delete the original.
view all ›
2 years ago
How to download files from repl.iti need to submit my .java files and don’t know how to export it from here
AskJavaJava
1 comment
Latest comments
Vandesm142 years ago
Download the files as a zip image
view all ›
2 years ago
MouseListeners in Java Swing are not WorkingI am transferring some of my Java GUI files onto repl.it. I noticed that when I tried to run this program, the progrma would not respond to my mouse a
AskJavaJava
comment