Publications
Introduction to Java : Data Types and Operators Part-3
Strings
As you may have noticed, in Java, there is no variable type called string. However, although Java does not have a built-in String type, it does provide you will a predefined class called String that you can use instead.
We’ll talk more about classes and using them in later sections. However, it would be nice to at least introduce the String class here so we can use it in the meantime.
Introduction to Java : Data Types and Operators Part-2
Data Types
Java is a “strongly typed language”. That means that type of every variable must be declared.
Consider the following simple variable assignments:
boolean isASwingDancer = true;
int age = 30;
In other words, Java requires that if a variable is meant to hold a boolean, it is declared as such. The same goes for ints and every other data type.
Once you declare a variable, it can never be changed to hold another type of value.
Introduction to Java : Data Types and Operators Part-1
Comments
It is often the case that you want to include comments within your Java code. Comments are little bits of documentation embedded in the actual code that is invisible to the Java compiler but which can be read by a person reviewing your code.
Comments help to document what it is that your code does and how someone should understand the design if they want to modify something. Comments are essential if someone else is going to work with you or take from where you’ve left off.
What’s A Netmask?
And Why Do I Need One?
When you set up a small network that interconnects to another network, the assignment of IP addresses and the “netmask” are very important. A lot of people get confused about this part, so here’s a short explanation of what’s going on.
IP Addresses
On a TCP/IP network, which is what you are building, every machine has a unique IP address, consisting of a total of 32-bits. The address is usually expressed as four decimal numbers separated by dots, where each number represents 8 bits of address. Each number therefore ranges from 0 to 255. (Note: the world is running out of IP addresses, so a new address scheme called IPng is being developed that uses six numbers instead of four. It is not yet actually in use.)
HTTP Authentications using PHP
The HTTP Authentication hooks in PHP are only available when it is running as an Apache module and is hence not available in the CGI version. In an Apache module PHP script, it is possible to use the Header() function to send an “Authentication Required” message to the client browser causing it to pop up a Username/Password input window. Once the user has filled in a username and a password, the URL containing the PHP script will be called again with the variables, $PHP_AUTH_USER, $PHP_AUTH_PW and $PHP_AUTH_TYPE set to the user name, password and authentication type respectively.