Fields = data members :P
Global is a concept when programming in C/C++ (and quite a few other languages) that meant everything had access to that variable. The reason it doesn't show up in Java is...
Type: Posts; User: helloworld922
Fields = data members :P
Global is a concept when programming in C/C++ (and quite a few other languages) that meant everything had access to that variable. The reason it doesn't show up in Java is...
:P there are no such things as "global" variables in Java, only object/class fields.
hmm. i'm going to assume that the method bit() gets a input of 0/1, then converts it to a number, right?
If so, you can use the .nextInt() method of the Scanner class, and then just see if value...
If you want to extract each character, use the .charAt() method
// get the first character
header.charAt(0);
hmm, the one thing I can see is wrong is using DataInputStream to get user input from System.in. This is causing Java to hang because technically, there's no end to the System.in stream. Instead, use...