When I grab the IP address from my open socket as someone sent me a stream, I noticed that the IP address has a slash.
I just plan on just dropping it. But first, I want to check the first character in the string - this is a forward slash:
String dataSource = data.getAddress().toString(); if(dataSource.substring(0,1) == "/"){ System.out.println("trailing forward slash, delete it "); dataSource = dataSource.substring(1); }
This IF statement is not detected.
Does anyone see what I'm doing wrong?
source share