[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

4chan codes OOP with java

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 28
Thread images: 3

File: javaversion.png (20KB, 571x486px) Image search: [Google]
javaversion.png
20KB, 571x486px
Write a java class, one post at a time?

Ill start:

public class 4chanClass
{
private boolean faggotry = True;
public int postsUntilClassIsFinished = 20;

public decreasePostsRequired(boolean APostHasOccurred)
{
if (APostHasOccurred)
PostsUntilClassIsFinished --;
}
>>
}
>>
>>58445292
you just completed the class, asshole

fuck, i feel trolled
>>
>>58445266
abstract class Anon {
static final boolean IS_FAGGOT = true;

private boolean isFaggot;

void setFaggot(boolean fag) {
isFaggot = fag;
}

boolean isFaggot() {
return isFaggot;
}

// TODO: You implement this.
absract void killYourself();
}

Anon op = new Anon();
op.setFaggot(Anon.IS_FAGGOT);
while (op.isFaggot()) {
op.killYourself();
}
>>
>>58445432
snap.
>>
>>58445432
>instantiating an abstract Anon
No.
>>
>>58445432
> abstract class Anon
> op = new Anon ()
>>
File: 1481277620099.jpg (3KB, 252x44px) Image search: [Google]
1481277620099.jpg
3KB, 252x44px
>>58445266
> class name starting with a number
>>
>>58445266
throw new SyntaxError(
}
>>
public class OP {
OP() {
while(1) {
System.out.println("I AM A MASSIVE FAGGOT.");
}
}
}
>>
so far none of these would be able to compile. learn syntax faggots
>>
>>58445266
>the inconsistent camel-case
>the newline curly brace in java

yes, this is /g/ indeed.
>>
If this thread used a meme language, it would have a ton more responses
>>
>>58447231
reading java makes me want to throw up
>>
>>58447256
the contents of the main function is already indented twice
>>
>>58445432
You must be new.
>>
>>58445722
You right, tho.

That was like one of the first things I learned in my first programming class.
>>
import javafx.scene.paint.Color;
import javafx.scene.shape.Arc;
import javafx.scene.shape.ArcType;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;


public class OP {
//The object of OP's desires.
public Circle leftNut = new Circle(25, 25, 25, Color.PINK);
public Circle rightNut = new Circle(50, 50, 25, Color.PINK);
public Rectangle shaft = new Rectangle(25, 25, 15, 50, Color.FLESH);
public Arc head = new Arc(40, 25, 25, 25, 45, 180);
head.setType(ArcType.ROUND);
}
>>
>>58445266
i know only Python

from imageboards import yotsuba
from cocksuckers import OP

class 4chan(yotsuba):
def measure_faggotry(person):
dick_counter = 1
for dick in Dicks.objects.filter(sucker=person):
print('%d dick that %s has sucked was %d cm long' % (dick_counter, person.name, dick.size))
dick_counter += 1
if dick_counter < 1:
print('%s isn't a faggot' % person.name)
elif dick_counter < 3:
print('%s is a moderate faggot' % person.name)
elif dick_counter < 8:
print('%s is giant faggot' % person.name)
elif dick_counter < 15:
print('%s is a massive faggot' % person.name)
else:
print('%s is an indescribable faggot. Congratulations.' % person.name)

4chan.measure_faggotry(OP)

what am i doing with my life
>>
from imageboards import yotsuba
from cocksuckers import OP

class fourchan(yotsuba):
def measure_faggotry(person):
dick_counter = 1
for dick in Dicks.objects.filter(sucker=person):
print('%d dick that %s has sucked was %d cm long' % (dick_counter, person.name, dick.size))
dick_counter += 1
if dick_counter < 1:
print('%s isnt a faggot' % person.name)
elif dick_counter < 3:
print('%s is a moderate faggot' % person.name)
elif dick_counter < 8:
print('%s is giant faggot' % person.name)
elif dick_counter < 15:
print('%s is a massive faggot' % person.name)
else:
print('%s is an indescribable faggot. Congratulations.' % person.name)

fourchan.measure_faggotry(OP)

fixed
>>
>>58448975
>using % for string formatting

Is there any reason why you still do this? The new way is pretty slick.

print(f'{person.name} is a massive faggot')


Less code and you can read it inline, obviously. Pretty nice.
>>
>>58448975
>>58449018
if /g/ is full of deviant homosexual cross dressing faggots, where do all the heterosexual people go to?
>>
>>58449067
didn't know about this, used it out of habit
>>
>>58445266
1. No constructor
2. No return types
3. True instead of true
4. No actual use of your written functions
5. Java

Fucking kill yourself
>>
>>58445266
>>58445292

>see one of those "let's write a java programm" threads
>immediately know the first reply will be something like "}"
>open thread
>see the first reply
>life is good
>>
>>58449067
What python version does this work in?
>>
when will you faggots learn a real programming language like html or apache
>>
>>58445292
Your meme already died
Thread posts: 28
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.