Serious Does anyone understand Java [Solved]

gymletethnicel

gymletethnicel

Incel Cinematic Universe Reality 2021
★★★★★
Joined
May 8, 2019
Posts
19,405
Online
358d 22h 45m
Didn't go to school today because I am really sick, there's this really simple exercise even I can't fucking do apparently. My code seems logical and shit and I actually have done this before in the exact same way, yet my code isn't working lol. I need your help buddy boyos.
 
Deleted member 19971

Deleted member 19971

Pray for the souls of the Linux atheists
-
Joined
Jul 21, 2019
Posts
24,555
Online
182d 10h 57m
Minecraft’s me.
 
Deleted member 14866

Deleted member 14866

prescriber of dogpills
-
Joined
Oct 6, 2018
Posts
14,579
Online
61d 10h 23m
java is the most populous island in the country of indonesia and hosts its capital jakarta
 
zangano1

zangano1

The truest of cels
★★★★★
Joined
Nov 8, 2017
Posts
22,702
Online
74d 12h 10m
I don't know Java bro
 
gymletethnicel

gymletethnicel

Incel Cinematic Universe Reality 2021
★★★★★
Joined
May 8, 2019
Posts
19,405
Online
358d 22h 45m
HidekiTojota said:
Minecraft’s me.
SoyUnPerdedor said:
java is the most populous island in the country of indonesia and hosts its capital jakarta
please buddy boyos why are you are not helping me
zangano1 said:
I don't know Java bro
Can't blame you, it's gay as fuck.
 
Deleted member 14866

Deleted member 14866

prescriber of dogpills
-
Joined
Oct 6, 2018
Posts
14,579
Online
61d 10h 23m
gymletethnicel said:
please buddy boyos why are you are not helping me

Can't blame you, it's gay as fuck.
ask stackoverflow
 
startcel

startcel

Black Saint Art
-
Joined
Sep 30, 2019
Posts
2,269
Online
66d 11h 2m
do i look like notch
 
Deleted member 19971

Deleted member 19971

Pray for the souls of the Linux atheists
-
Joined
Jul 21, 2019
Posts
24,555
Online
182d 10h 57m
gymletethnicel said:
please buddy boyos why are you are not helping me
I would if I could bro, but I don’t know anything about Java.
I even struggled with HTML and CSS.
It’s fucking over.

If this was history related I could help.
 
gymletethnicel

gymletethnicel

Incel Cinematic Universe Reality 2021
★★★★★
Joined
May 8, 2019
Posts
19,405
Online
358d 22h 45m
I

Indari

YAAAAAMEEEEROOOOOOO !!!!!
-
Joined
Nov 7, 2017
Posts
27,532
Online
116d 23h 44m
it's like starbucks in kenya
 
FinnCel

FinnCel

Alcoholcel
★★★★★
Joined
Dec 13, 2018
Posts
33,491
Online
126d 8h 12m
Pretty easy ngl
 
Deleted member 14866

Deleted member 14866

prescriber of dogpills
-
Joined
Oct 6, 2018
Posts
14,579
Online
61d 10h 23m
post the code here if you can
 
gymletethnicel

gymletethnicel

Incel Cinematic Universe Reality 2021
★★★★★
Joined
May 8, 2019
Posts
19,405
Online
358d 22h 45m
SoyUnPerdedor said:
post the code here if you can
//Main method
public class Main {
public static void main(String[] args) {
Person person = new Person("Saint Hamudi", 31);
person.printPerson();
}
}

//Class Person
public class Person {
private String name;
private int age;

public Person(String name, int age) {
this.name = name;
this.age = age;
}

public String printPerson () {
return "Name: " + this.name + "\n" + "Age: " + this.age;
}
}

It doesn't return anything at all, I've done this shit before with the toString() method, but his doesn't work at all for some reason. tfw no indentation.

FinnCel said:
Pretty easy ngl
:chad::banhammer:
 
FinnCel

FinnCel

Alcoholcel
★★★★★
Joined
Dec 13, 2018
Posts
33,491
Online
126d 8h 12m
gymletethnicel said:
//Main method
public class Main {
public static void main(String[] args) {
Person person = new Person("Saint Hamudi", 31);
person.printPerson();
}
}

//Class Person
public class Person {
private String name;
private int age;

public Person(String name, int age) {
this.name = name;
this.age = age;
}

public String printPerson () {
return "Name: " + this.name + "\n" + "Age: " + this.age;
}
}

It doesn't return anything at all, I've done this shit before with the toString() method, but his doesn't work at all for some reason. tfw no indentation.


:chad::banhammer:
You have to write
System.out.print()

Right now you are returning a string but never printing anything
 
gymletethnicel

gymletethnicel

Incel Cinematic Universe Reality 2021
★★★★★
Joined
May 8, 2019
Posts
19,405
Online
358d 22h 45m
FinnCel said:
You have to write
System.out.print()
Jesus fucking Christ, they gave me the main method as is and it didn't talk about the main method at all in the exercise. Usually they give you a main method and you are just supposed to copy/paste that and then work on the classes and interfaces. Fucking college lol. Thanks though.
 
startcel

startcel

Black Saint Art
-
Joined
Sep 30, 2019
Posts
2,269
Online
66d 11h 2m
FinnCel said:
You have to write
System.out.print()

Right now you are returning a string but never printing anything
u r like rick from rick and morty mr alchol
 
FinnCel

FinnCel

Alcoholcel
★★★★★
Joined
Dec 13, 2018
Posts
33,491
Online
126d 8h 12m
Vermilioncore

Vermilioncore

permavirgin failure
-
Joined
Apr 19, 2019
Posts
11,469
Online
76d 56m