r/javahelp • u/MBlank1 • Mar 08 '20
Eclipse
Anyone know a good website/YouTube videos to download and configure eclipse on a MacBook Pro? Or is it as simple as downloading it from a eclipse website?
r/javahelp • u/MBlank1 • Mar 08 '20
Anyone know a good website/YouTube videos to download and configure eclipse on a MacBook Pro? Or is it as simple as downloading it from a eclipse website?
r/javahelp • u/SussyBallsBaka • Apr 14 '24
I'm sorry for this stupid question, but I'm really struggling here. I'm using Linux, and I don't know what I should install, there are so many packages. Should I install java, jdk, jvm, jre??? Maybe Openjdk? Java 8, 17 or 20?
For context, I'm coming from Python and a little bit of C, and installing python is easy you just install the python interpreter and run "python", or with C you just install GCC and glibc (if you don't have it for some reason). But for Java there are so many options and so many packages I just want to compile and run Java files, with the Java standard library, help please?
r/javahelp • u/lmmuir • Oct 10 '15
public String reverse(String x){
for (int i = (x.length()-1); i>=0;i=i-1){
}
return(x.charAt(i));
}
r/javahelp • u/Fad1126 • Nov 20 '24
my senior project as CS student will be as Web App using these technologies as I told the Projects committee at the college: Java, HTML,CSS,JavaScript and MySQL which almost I should committed to while I am doing the project.
I can use the Core java or spring/spring boot (Like I know what the difference).. I dont have knowledge in connecting with database using Core java nether the frameworks..
The QUESTION is what should I do** what is the easiest way to do this project ** between the two options and to pass my anxiety and this college.
Please your knowledge and expertise will really help me in this situation thanks in advanced.
r/javahelp • u/JY-HRL • Dec 04 '23
hi, I have a question for using Java to develop web app.
I know that Java is very popular in developing mobile app, but I noticed that PHP Laravel and Ruby on Rails are more widely used in web app than Java.
Is Java really good for developing web app?
Thanks!
r/javahelp • u/kkgmgfn • Feb 21 '21
I am Java developer, also know kotlin. But I am having hard time dealing with oops and design patterns.. Should I switch to nodejs..? Since AFAIK it doesnt have oops.
r/javahelp • u/chipmang0667 • Oct 30 '18
Hello, so I need help understanding the error in my javascript here. It's supposed to take a 4 digit number and switch the 1st with the 3rd digit as well as the 2nd with the 4th. Here is the code. I think the error has something to do with how I set up the document, but I'm not quite sure, it looks fine to me.
I'll open in chrome, Firefox or Edge, all that will happen is that it shows the title at the top of the browser tab and that's it. I'm using the newest version notepad++
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html>
<head>
<title>Encryption</title>
<script type="text/javascript">
import java.util.Scanner; //Needed for Scanner classpublic class LNFI_LNFI_program2 { public static void main(String[] args) { getnum(); //Calls for getnum() method
}
public static int getnum() { int fourD = 0, stringSize = 0; String fourDs; //To hold the value of input number in a String
Scanner kb = new Scanner(System.in);
while (stringSize != 4)
{
System.out.println("Enter a four digit number"); //Prompt user for four digit number
fourDs = kb.nextLine();
stringSize = fourDs.length(); //Checks length of String
if (stringSize == 4)
{
fourD = Integer.parseInt(fourDs);
}
}
encrypt(fourD);
return fourD; //Return value of input
}public static int encrypt(int num) { int a, b, c, d;
a = num / 1000;
b = num / 100 % 10;
c = num / 10 % 10;
d = num % 10;
a = (a + 7)%10;
b = (b + 7)%10;
c = (c + 7)%10;
d = (d + 7)%10;
System.out.println(c+d+a+b);
return (c+d+a+b); //Returns encrypted value
</script>
</head>
<body></body>
</html>r/javahelp • u/footballa • Jan 12 '15
Sorry if my vocabulary is not accurate. My idea is to have something like this:
..... Static List<String> fileNames = new ArrayList<String>(); .. Other fancy stuff Int I; ..
Public static void main(String[] args){ playSound(fileNames[i]); ..do other stuff.. playSound(fileNames[i+1]); }
Where playSound(); is a command to play the sound of a given String, which in this case comes from the Array list. Does that make sense?
r/javahelp • u/JCWMMFromMiiverse • Sep 20 '15
I would like to integrate a BASIC code emulator/interpreter in my latest Java-based game. The idea is to have the character in the game to open up a BASIC command console so that it can interact with certain objects in the game. Could someone give me some pointers or suggestions on how to implement a BASIC interpreter into Java?
r/javahelp • u/macetfromage • Mar 27 '21
i dontunderstand the results when the nr to the right is larger
ofc 4%3=1
but why 3%4=3
r/javahelp • u/monstyrman • May 08 '22
I just translated a python program to java to speed it up, but it's only about 28% faster, and using almost none of my CPU's power. I figured it should use a full thread, but when I look at task manager (Windows) I can't tell it's running...
I've tried using both Eclipse and Intellij, I've tried increasing the process priority, no other programs are open really either. What am I doing wrong?
r/javahelp • u/gonnahike • Sep 07 '19
I've tried googling it, but I can't find an explanation..
r/javahelp • u/[deleted] • Feb 22 '16
Chrome and Edge have dropped Java support. Why is this happening?
r/javahelp • u/ranar1 • Oct 19 '13
The mathematician Augustus De Morgan was aged 43 in the year 1849AD. This is interesting because 43 squared is 1849, ie, in 1849 his age was the square root of the year. Given that no person has ever lived longer than 123 years (and assuming that no one ever will), write a Java application that will determine if it is possible that anyone who is alive today is, has ever been, or will ever be alive in a year that is the square of their age. If it is possible, your program should print out the years in which it happens and the ages that the people concerned will have in those years.
Here is what I have worked on till now
public class SquareAge {
public static final int START_YEAR=2013;
public static final int YEAR_MAX= 2136;
public static final int YEAR_MIN=1890;
public static final int MAXIMUM_AGE=123;
public static void main(String[] args) {
int age;
for (age=0; age<=MAXIMUM_AGE; age++);
{
int agesquare=age*age;
if (agesquare>=YEAR_MIN && agesquare<=YEAR_MAX && age>=agesquare-START_YEAR)
{
System.out.print("the age is " + age + " the year is " + agesquare);
}
else
{
System.out.print("none");
}
}
}
}r/javahelp • u/Arunzeb • Jun 17 '19
It's really annoying. No matter what I do, another program runs. I have separated the Package file*, but it didn't work.*
r/javahelp • u/Droidx4_66 • Sep 03 '13
I am a student who just got introduced to Java. I'm coming from a background of mainly C and some C++. I would like some expert opinion on how to go about learning java. I would prefer video lectures in addition to reference books. I have already done some studying and DON'T find it very confusing. I just don't know how to move from the beginner level to the intermediate level and eventually to advanced level.
PS: I'm sorry if this question has been asked before, I would like to get fresh answers please. Thank you.
r/javahelp • u/cosmorocks • May 19 '15
Hey guys,
So in my AP Computer Science class I was assigned a final project.. My friend and I decided to try to make a piano/cello that plays a sound when a user presses a key on the keyboard. However, my teacher taught us almost nothing on how to make a GUI or even what it is really, and we barely know how to do anything more than for loops, while loops, etc. Are there any tips for beginners like us? I cannot find good tutorials regarding GUIs and using sounds in java, or if any of you guys can help i'd appreciate it. Thanks.
r/javahelp • u/Karrakarra • Apr 17 '13
i understand the concept of objects and creating objects i just dont know how to define an object subclass from scratch...
r/javahelp • u/MelonHeadSeb • Jan 08 '22
Hi I am learning Java and came across this:
@Override
public boolean equals(Object o) {
return x.equals(((Item)o).getX());
}I am not sure what it means when it is returning that entire thing? I have not seen just "Object" in the parameter like that either. Sorry if I am not being very clear.
r/javahelp • u/Exciting_Ad_788 • Nov 13 '22
Hi everyone,
I have planned to start learning Java but I don't know where to start. Can you please help me out?
Thank you so much in advance!
r/javahelp • u/ramejthesimp • Dec 07 '22
String ans;
Scanner input = new Scanner(System.in);
String animals[] = {"fox" ,"cat","dog","chicken","komodo dragon" };
ans = input.nextLine();
switch(animals[ans])
case "2":
System.out.println(animals\[2\] + " Is a good boi");
break;
r/javahelp • u/m7md20091 • Nov 10 '22
I am learning Java at school and wondering if there a way that I can learn and make money with Java (since I am studying it anyway )
r/javahelp • u/tonywestonuk • Sep 12 '15
Assuming that you already have the Java SDK installed, these are the steps to get a hello world program running in TomEE.
Download / unpack Tomee.
wget http://mirror.catn.com/pub/apache/tomee/tomee-1.7.2/apache-tomee-1.7.2-jaxrs.tar.gz tar -xvf apache-tomee-1.7.2-jaxrs.tar.gz
Create folders to store your app.
mkdir -p apache-tomee-jaxrs-1.7.2/webapps/helloworld/WEB-INF/classes cd apache-tomee-jaxrs-1.7.2/webapps/helloworld/WEB-INF/classes
Create the HelloWorld.java
vi HelloWorld.java
import javax.ws.rs.*;
@Path("/") public class HelloWorld {
@GET
public String home(){
return "Hello World";
}}
Compile it.
javac -classpath "../../../../lib/*" *.java
Start the server.
sh ../../../../bin/startup.sh
Navigate to page http://localhost:8080/helloworld
r/javahelp • u/Captain-Duncan • Apr 07 '25
So I am taking Data structure course and for some reason it’s difficult for me we are only taking arrays linked lists (single,circular , double circular) recursion and stacks but for some reason I keep messing up my quizzes and midterm I am much better at OOP course (Java) how can I enhance my skills so I don’t fail.