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.