java.lang.nullPointerException while performing Socket programming..How to use same socket object
The instance of Password is different from the
MainActivity instance. Hence they do nog share state, and thus
the soc instance var is empty. You might try to pass it along
when you start the Password activity. You can do that using Intent.putExtra.