1. Originally Posted by Webuser
Yes, it is mushroom. Cool... you eat mushrooms for breakfast :D
Yeah, mom prepare it for today, breakfast as well as for my lunch.

2. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
Originally Posted by Eranga
Here is another,

I want to make this true, by adding only one line in any direction. I found three ways to solve this. :p Hope that the question is clear to all.
you mean + 1/-1 character?

3. I think it's better to give a one solution. Then you can find the others. Sorry if I didn't make you clear enough on my question.

Say I draw a line across the = sign, and it become in-equal, ≠ sign. So that the statement become,

5 + 5 + 5 ≠ 550

:p

4. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0

5+5+0=55
?

5. No you cannot remove anything form that and also cannot added any additional characters. And you can use only one line, and you can place it in any direction in anywhere in the statement. Lol, this is not a trick actually, a joke, or a funny thing. :D Just think in very odd way, I'm sure you can find the solution.

6. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
50+5=55
or the statement must contain 2 + characters at once?

7. Oh no. Still you are mess-up with this lol.

Simply you can only added one single line as you wish. But you CANNOT change the format of that statement lol. Did you get the point?

8. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
may be... But I get "line" word as

line 1 = 5 + 5 + 5 ≠ 550
line 2 = a+b=c
etc :(
Last edited by Webuser; 04-20-2010 at 05:53 AM.

9. But you cannot remove anything lol. :) I told you that this hasn't any standard mathematical way to solve, think in odd way.

This is the second way to do this.

5 + 5 + 5 ≥ 550

That's true right? Then I think you can find the other way.

10. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
5 + 5 + 5 ≥ 550
That's true right?
Right if you want to concat 555 ;)

11. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
5 + 5 + 55>=50
:rolleyes:

12. Senior Member
Join Date
Dec 2008
Posts
526
Rep Power
0
but I think that +5 it is all the same as 5 :) So, as an alt, it can be solved in math way too ;)

13. Originally Posted by Webuser
Right if you want to concat 555 ;)
I told you, this is really odd way to use in maths. D

14. Originally Posted by Webuser
5 + 5 + 55>=50
:rolleyes:
:D You've use additional digit, 5, at last.

15. Member
Join Date
Jan 2010
Posts
90
Rep Power
0
here is one more..

will the below code print

for all the executions (any number of executions / randomly executing).

Java Code:
```
static String msg[] = { "This", "is", "a", "synchronized", "variable" };

}

public void run() {
display(getName());
}

public [B]synchronized[/B] void display(String threadN) {
for (int i = 0; i <= 4; i++)
try {
this.sleep(1000);
} catch (Exception e) {
}
}
}

public static void main(String[] args) {
Share t1 = new Share("Thread One: ");
t1.start();
Share t2 = new Share("Thread Two: ");
t2.start();
}
}```
or will it sometime print

Last edited by Cbani; 04-20-2010 at 04:24 PM.

16. Moderator
Join Date
Apr 2009
Posts
11,294
Rep Power
18
At first glance, since the method is synchronised, I would say that it'll print all the Thread One stuff, then all the Thread Two stuff. The sleep shouldn't affect the synchronising of the owning thread, which should be thread one initially.

17. Member
Join Date
Jan 2010
Posts
90
Rep Power
0
not exactly...

18. Originally Posted by Tolls
At first glance, since the method is synchronised, I would say that it'll print all the Thread One stuff, then all the Thread Two stuff. The sleep shouldn't affect the synchronising of the owning thread, which should be thread one initially.
I beg to differ: a synchronized method synchronizes on the object for which it is a member; different objects synchronize on different 'this's so the printing will happen in no particular order.

kind regards,

Jos

19. Member
Join Date
Jan 2010
Posts
90
Rep Power
0
answer is correct; but any proper justification?

20. Member
Join Date
Jan 2010
Posts
90
Rep Power
0
where z Eranga? Busy with no doors and no windows room :)

Page 51 of 55 First ... 414950515253 ... Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•