I don't know enough java, so I am probably doing this wrong. What I would like to have, is a String that has the second octet of an IP address, weather it is an 8 or 58 or 103, just as an example.

import java.net.*;
import java.io.*;
import javax.swing.JOptionPane;
public class findip {
public static void main(String [] args) throws IOException{
	String myip,myip2;
	InetAddress thisIp =InetAddress.getLocalHost();
	//System.out.println("IP of my system is := "+thisIp.getHostAddress());
	myip=thisIp.getHostAddress();
	myip2=myip.charAt(3)+myip.charAt(4);
	//need to just show or have 2nd octet
	JOptionPane.showMessageDialog(null,"IP:__"+myip+"\n\nSchool Num:__"+myip2);
}}