13 lines
287 B
Plaintext
13 lines
287 B
Plaintext
|
public class Assert
|
||
|
{
|
||
|
div( divident, divisor )
|
||
|
{
|
||
|
assert divisor != 0 : "Oh bitte keine Zahl durch null teilen.";
|
||
|
return divident/divisor;
|
||
|
}
|
||
|
public static void main( args )
|
||
|
{
|
||
|
println( "Quotient ist " + div(10, 2) );
|
||
|
println( "Quotient ist " + div(10, 0) );
|
||
|
}
|
||
|
}
|