greptilian logo

IRC log for #friendlyjava, 2018-01-31

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
05:56 nanoz joined ##friendlyjava
05:56 * nanoz winks at java 9
08:09 abba joined ##friendlyjava
08:31 abba joined ##friendlyjava
08:32 mr_lou joined ##friendlyjava
08:41 nanoz joined ##friendlyjava
10:51 abba_ joined ##friendlyjava
12:26 abba_ joined ##friendlyjava
14:45 mr_lou joined ##friendlyjava
15:20 abba_ joined ##friendlyjava
16:10 nanoz joined ##friendlyjava
16:11 nanozz joined ##friendlyjava
16:36 fekir joined ##friendlyjava
17:53 nanozz oi aditsu pdurbin pulsar mr_lou
18:26 aditsu hai
18:27 nanozz aditsu i got my hand on threading and you know what i got into trouble
18:27 nanozz i'm going crazy with this code
18:27 nanozz https://pastebin.com/0BqpByAx
18:28 nanozz what will i need to change inorder to make it work :!
18:35 aditsu depends what you mean by "make it work"
18:48 nanozz well
18:48 nanozz mmmmm
18:48 nanozz i like to handle each thread its task
18:48 nanozz t1 for even thread --- which prints event numbers
18:48 nanozz t2 odd threads
18:49 nanozz in the end it should be 0 , 1, 2, 3,4,5 ..... sequential
18:49 aditsu well, your threads are not printing anything
18:50 nanozz well its going to dead lock
18:50 aditsu I don't think there is any deadlock there
18:52 aditsu or maybe there is? but it's not really behaving much differently then I expected
18:52 aditsu than*
18:54 aditsu anyway, if you want to do things sequentially, you don't need multiple threads
19:25 nanozz this works great https://pastebin.com/VkWTiFmy
19:46 nanozz i modified my code it works too :)
19:46 nanozz thnks guys!
19:51 nanozz one basic question why string class implements comparable when it has equals on it?
19:54 fekir joined ##friendlyjava
20:06 pulsar equals is equivalent to o1.compareTo(o2) == 0. beyond that compareTo is used for keeping objects in natural order. either by sorting them or by using data structures consuming comparable objects (SortedMap for instance). Just read up the javadoc on the comparable interface.
20:06 pulsar so from that point of view, compareTo and equals are very different things.
22:02 kirua joined ##friendlyjava
22:03 kirua joined ##friendlyjava
23:10 kirua joined ##friendlyjava

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode