Thing t = new Thing(); t.method( (int i)-> i + 1 );
Here is a skeleton for class Thing:
class Thing { public interface Mystery { ????? } public void method( Mystery param ) { // body of method omitted } }
Which text below would work where ????? is given above:
a) void method( int i );
b) int method( int i );
c) abstract int method( int i );
d) abstract void method( int i );
e) private int method( int i );
Simulator.schedule( 8.0*hour, (double t)->w.open(t) );Assume that w is a workplace, and every workplace has a method open(double t) that simulates the workplace opening for business at time t.
The value 8.0*hour is passed as t to w.open(t) through the
following steps that are not given in order (and some steps are
omitted):
v) e is removed from eventSet.
w) 8.0*hour is put in e.time for some Event e.
x) w.open(t) is called.
y) e.act.trigger(e.time) is called.
z) e drifts to the head of eventSet.
What is the correct order for these steps?
a) vwyzx
b) xwyvz
c) ywzvx
d) wzvyx
e) zywvx
public void open(double time) { Simulator.schedule( time + 8*hour, ------- ); }What code belongs where the above shows -------?
Get Answers For Free
Most questions answered within 1 hours.