24
งาน
Java Multithreading, ระดับ, บทเรียน
Determine the network address
1) The IP address and subnet mask are given. You need to calculate the network address: implement the getNetAddress method.
Use the bitwise AND operator.
Example:
IP address: 11000000 10101000 00000001 00000010 (192.168.1.2)
Subnet mask: 11111111 11111111 11111110 00000000 (255.255.254.0)
12
งาน
Java Multithreading, ระดับ, บทเรียน
Compare modifiers
Implement the logic of the isModifierSet method, which checks
whether the passed allModifiers argument has a specific modifier set (specificModifier).
P.S. Before implementing the task, take a look at the Modifier class and the implementation of isPublic, isStatic, and so on.
12
งาน
Java Multithreading, ระดับ, บทเรียน
Everything ingenious is simple!
Simplify. Don't rename variables. Don't leave comments.