Check if value fits in byte
Java
Easy
4 views
Problem Description
Task: return true if x can fit in a signed byte (-128..127).
Output Format
Return value
Constraints
Use range check.
Official Solution
static boolean fitsByte(int x){return x>=-128 && x<=127;}
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!