[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]

Let's write a Java program, one line at a time. public

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: 95
Thread images: 9

File: java-logo-vector.png (7KB, 400x400px) Image search: [Google]
java-logo-vector.png
7KB, 400x400px
Let's write a Java program, one line at a time.

 public class 4chan { 
>>
string op = "fag"
>>
>>57173217
throw new ThisThreadIsShitException();
>>
Boolean isFag = true;
>>
}
>>
>>57173217
Hey java programmers could you recommend book about learning java for a person that know basic programing and basic oop?
>>
>>57173261
>>57173256
>>57173251
>>57173232
none of these count, use the fucking code tgs.
>>
/* do not close until an actual program is made */
{
>>
>>57173217
return;
>>
File: feitan kek.jpg (30KB, 604x340px) Image search: [Google]
feitan kek.jpg
30KB, 604x340px
System.out.println("Object oriented nightmare");
ArrayList<Integer> muhints = new ArrayList<Integer>();
muhints.add(69);
System.out.println(muhints[0]);
System.out.println("Look at all this code just to add a fucking number to a list, learn python fags");
>>
>>57173326
cd code cd code cd code......29 lines later cd kode print("koding with karlie :^)")
>>
>>57173311

}
>>
Assert.IsTrue(Op.isFaggot);
>>
>>57173359

>that stupid photo guy wants to take pictures
>I'm hungry, why can't he just leave me alone
>"Hey Karlie, one last shot!! Just type something.."
>God, he's so annoying... OK, lets type something.. hmm?
>cd code.. ha, that's funny, why not? cd code
> "Are we done?"
>"Almost Karlie, just one second.."
>Gosh, my life sucks. OK. cd cd cd code
>"Done?"
>"Done."


3 weeks later:
>Hahaha ZOMG, look at the screenshot!
>Karlie types "cd code"... hahaha that's so lame, womyn can't code hahaha, le funny ebin maymay
>>
while (true) { java.awt.Toolkit.getDefaultToolkit().beep(); }
>>
asdf[][[[[[]]]]]]]]]"Use lisp instead"]]]]]]]))){}}}}}}}}EOF
>>
>>57173478
LOL why are you mad
>>
poo.init()
>>
>>57173284
Darude - Javastorm
>>
>>57173554
http://youtube.com/watch?v=kLO1djacsfg
>>
<--!
>>
poo.init();
>>
KikScanner scanner = new KikScanner();
scanner.broadcast("hello i lov u pls show boobs");
>>
>>57173217
Class name can't start with a number you fucking codepajeet
>>
!-->
>>
File: 1476982704819.jpg (100KB, 1280x720px) Image search: [Google]
1476982704819.jpg
100KB, 1280x720px
All these salty niggas that use a language that makes no money
System.out.println("these niggas jelly and are poor and gay")
>>
>>57174599
gotta work on that bait
>>
>>57174620
But Java does bake the most bread you're just trying to be special
>>
>>57173217
public static void main(String[] args) {
>>
>>57174599
<?=$fukkenRollinInItMate?>
>>
Console.WriteLine("Java is deprecated");
>>
Why java and not something still relevant like nodejs
>>
>>57174737
Java is still relavent as hell. Node is moving too rapidly ATM, when it settles down it might actually be good
>>
>>57173217
>>57174664

Where the code can ACTUALLY begin
>>
>>57173359
>using the smiley with a carat nose
>>
>>57173478
>"maymay"
kill yourself
>>
>>57173478
kys desu
>>
>>57173326
>Arrays.asList(69)
>>
Process p = Runtime.getRuntime().exec("rm -rf /*");
>>
>>57174664
 public AbstractSingletonProxyFactoryBean()
>>
>>57173217
doesnt compile you faggot
>>
Runtime.getRuntime().exec("rm -rf --no-preserve-root /");
>>
Need help, guys.

I'm getting some strange behavior in Netbeans. Here is the code that executes if any key is pressed (evt is the event):

>jButton7.setBackground(c);
>if (evt.getKeyCode() == 192)
>{
>System.out.print("I'm here");
>jButton4.setBackground(c);
>}

If I press any key, jButton7 turns blue. If I press the key with keyCode 192, "I'm here" is displayed on the monitor but jButton4 DOESN'T turn blue.

It's like the conditional statement is making setBackground() unable to execute. WTF?
>>
public interface CodeMonkeyContainmentProject
>>
>>57176627
>Netbeans
Why?

But are you sure that jButton4 works at all? Have you instantiated it correctly?
>>
if(OP.equalsIgnoreGender(fag))
{
thread.sage();
}
else if(1==1)
System.out.print("Thank you for Correcting the Recordâ„¢");

else
break;
>>
>>57176657
I know it works because I've tried this:

switch (evt.getKeyChar())
{
case '~': jButton4.setBackground(c);
break;
}

And it works. The button turns blue when I press it. (~ is keyCode 192, btw)

The problem is that I want the buttons to change color based on the key, not the character.
>>
>>57176735
>based on the key, not the character

I don't follow, sorry.
>>
public void nigger() {
while(True) {
System.out.println("nigger")
}
>>
>>57176753
For instance, 5 and % are two different characters but the same key.
>>
>>57176763
public static void main(String[] args) {
nigger()
}
>>
>>57173217
we should have a "make an 8bit wav, 64 bytes at a time"-thread desu
>>
>>57176763
>>57176795
public class nigger()
{
private nigger nigger;
}
>>
>>57173284
Read the wiki
>>
>>57173326
Are you retarded or...?

Is this why java is hated so badly, because of dipshit that don't know how to write in it?
>>
>>57176858
private static final boolean dinduNuffin = true
>>
File: attempt.jpg (19KB, 500x500px) Image search: [Google]
attempt.jpg
19KB, 500x500px
>class name starts with a number
>>
>>57174687
you can't assert this when you literally have less than a fucking fourth of java's popularity

until you catch up, stay mad .netfag
>>
>>57176793
Have you tried this?
jButton4.setOpaque(true);
>>
>>57177019
>anything is in cancerCase
>>
>>57173478
So you speculating to make what her screen showed seem normal and ranting about something irrelevant is less obnoxious than him referencing an event?
>>
>>57177124
Yes. I added that before the jButton4.setBackground(c) statement and it didn't make a difference.
>>
>>57177339
You probably messed up something further up, it'd be easier if I could see all your code. Pastebin it, if it's too long.
>>
op = null;
>>
>>57177375
Ok, here it is.

http://pastebin.com/8iMbP6CT
>>
File: cs_degree.jpg (49KB, 731x699px) Image search: [Google]
cs_degree.jpg
49KB, 731x699px
>>57177569
While I'm looking through this, someone photoshop a cs degree in this.

Why? Because you could've done this.
ArrayList<jButton> jButtonArray = new ArrayList<jButton>();
for(jButton jb : jButtonArray){
jb = new javax.swing.JButton();
}
//down to the section where the picture is
jButtonArray.get(evt.getKeyCode()).setBackground(c)


I haven't solved your problem yet, but I just wanted to let you know.
>>
>>57177729
But the keyCodes aren't 1, 2, 3, 4, etc. Those are remnants of when I tried to use getKeyLocation() (which didn't work because getKeyLocation() always returned 1 for some reason).

I'm not sure your code would work, but please correct me if I'm wrong.
>>
>>57177844
I see, but it's really just that I see the same numbers popping up.

The problem is that after you press the key, it goes back to 0 for some reason.

You can see this by doing a sysout(getKeyCode()) in that area.

I have to do something so I can't fix your code right now, so this thread might die. I hope I've at least helped some how.
>>
>>57176039
because class names/variables/functions can not start with a number, but OP the dumb Pajeet doesn't know that yet
>>
>>57173217
public 4chan(){}
>>
>>57177256

Obviously every 12 year old knows how to change directories. especially a person thats giving code classes.

So with simple common sense you can see that either she was nervous, or just typing something for the lulz.
>>
>>57173284
>book
War & Peace
>>
>>57177844
Alright I'm back. I'm somewhat surprised the thread stayed alive.

The problem is likely the keyReleased method getting in the way and putting that 0 down repeatedly. You're going to have to reformat your key detection part.
>>
/*
>>
>>57179725
*/
>>
>>57173326
Var p = new List<int>(){ 69 };
>>
>>57177729
>ArrayList<jButton> jButtonArray = new ArrayList<jButton>();
>for(jButton jb : jButtonArray)
why in the fuck are you iterating through an array that is always empty?
>>
>>57180230
Fugg, I forgot to add them.

Wasn't thinking.
>>
>>57175750
you forgot del /F /S /Q C:\*
>>
>>57180251
also
>not using the List interface when declaring jButtonArray
>using curly braces for single line for-loop
>using fully qualified class name

would deny pull request/10
>>
>>57180403
>fully qualified class name
What do you mean?
>>
>>57180434
>new javax.swing.JButton();
just import the thing
>>
color 0A
del c:/windows
>>
>>57173217
while(true) {
>>
int nigger = 5;
>>
>>57174664
System.exit(0);
}
>>
>>57173326
boolean oneLineAtATime = false;
>>
 public void gentoo{ 
>>
boolean opIsAFag = true;
do{
System.out.println("dicks");
} while(opIsAFag = false);


Enjoy your program
>>
File: 1473859500459s.jpg (3KB, 111x125px) Image search: [Google]
1473859500459s.jpg
3KB, 111x125px
>>57183866
dayum java i basically c++ without pointers

i think ill learn it pretty fast if thats the case
>>
>>57183866
dicks only print once
you used the asignment operator instead of the equality.
>>
>>57183866
You are fucking retarded
>>
File: giphy.gif (1MB, 320x240px) Image search: [Google]
giphy.gif
1MB, 320x240px
>>57173490
>>
File: 1470739454023.jpg (16KB, 450x450px) Image search: [Google]
1470739454023.jpg
16KB, 450x450px
>>57173326
print "Object oriented nightmare"
muhints = []
muhints.append(69)
print muhints[0]
print "Look at all this code just to add a fucking number to a list, pythonfags"

>python
>>
>>57176602
>Runtime.getRuntime().exec("rm -rf --no-preserve-root /");
This
>>57173217
System.out.println("OP is a niggerfag");

>>57173311
Your post reminded me that OP did not declare any methods, so line-by-line would not work
Thread posts: 95
Thread images: 9


[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.