Member Avatar

Button1.DoDragDrop(BackgroundImage, DragDropEffects.None) Throws an error ' Object reference not set to an instance of an object. ' First time I've used DoDragDrop, and first time with 2012 :)

0
1
Member Avatar

Is it mandatory to handle an exception that is thrown using the `throw` keyword? If so is there a separate rule for Checked and Unchecked Exception, as in who should be mandatorily caught? public void met() { throw new ArithmeticException

Member Avatar
0
2
Member Avatar

Heloo,this wil be my first post here, the reason for that is I can't figure this one out by myself public class Client extends Thread{ Socket socket = null; ServerResponse sr = null; private class serverResponse extends Thread{ InputStream in = null; public serverResponse(Socket socket) throws IOException{ if (socket == null) { System.out.println("socket:null");} this.in = socket.getInputStream(); } public void run() { try { while (true) { if (!socket.isClosed() || socket.isConnected()) { byte[] input = new byte[1024]; // read the message in.read(input, 0, input.length); // unserialize and dispatch } } } catch (IOException ex) { System.out.println("IOException in waitForReplyFromServer"); ex.printStackTrace(); } finally …

Member Avatar
0
15
Member Avatar

hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] import java.io.*; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.util.*; public class FileEncryptor { private static String filename; private static String password; private static FileInputStream inFile; private static FileOutputStream outFile; public static void main(String[] args) throws Exception { // File to encrypt. It does not have to be a text …

Member Avatar
0
4

The End.