10-26-2014, 08:06 AM
(10-25-2014, 09:23 AM)Sunos Wrote: It's pretty useful for functional interfaces and small forloops to make code more compact and readable.
However, this is the only time that i'd use them. Other ways are indeed very useless.
Example:
Code:new Thread(r -> Thread.sleep(500)).start();
Instead of:
Code:new Thread(new Runnable(){
public synchronized void run(){
Thread.sleep(500);
}
}).start();
AND:
Code:Vaginas.pussyList.forEach(v -> v.queueNewPeriod());
Instead of:
Code:for(Vagina v : Vaginas.pussyList){
v.queueNewPeriod();
}
Although it does seem the exact same...
Yeah. Lambdas ARE completely useless, except for functional interfaces.
also u can override run()v in thread instead of making a new anonymous runnable