I can't seem to find anything wrong

I can't seem to find anything wrong with this syntax. Am I crazy?
public class AA
    private int x;
      private int y;
      public AA()
          x = 0;
            y = 0;
      public AA(int a, int b)
          x = a;
            y = b;
      public int sum()
          return x + y;
      public void print()
          System.out.println(x + " " + y);
[\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

brock01 wrote:
[\code]Make that
Describe the problem, post the actual errors, etc.

Similar Messages

  • I have only had my ipad a few months and just noticed that my calendar has erased all of my appointments (except recurring) from Jan., through 2nd week in March.  Can't seem to find anything in settings on this...help!noticed that

    I have noticed my appointments in calendar have been erased from January through 2 nd week in March. Can't find anything in settings about this...help!

    I have noticed my appointments in calendar have been erased from January through 2 nd week in March. Can't find anything in settings about this...help!

  • My tech person on campus wants to know the apple number of the apple tv so he can directly hook the internet into the apple tv without a password. I can't seem to find anything but the serial number on the box or on the tv? Does anyone know where it is?

    I bought apple tv thinkng it would save me from my college life of not being able to have cable but it has cost more of a problem Be
    ause my campus is so large we have passwords to log into our network. When I called the tech people they siad if i had the apple number they would be able to connect it to the network without a password. I tought this was the source of my problem because i can not connect to the server because it is not loging in to my apple id and password that is my itunes account. I have checked it multiple times and thats not the problem. The other problem is I can not find the apple number the tech was describing to connect it to the network. Does anyone know the answers to my problems? Im a college student in dire need of tv!

    Hi,
    I imagine he means "encrypted wireless.
    I'm a little confused about what the IT guy wants. If your campus has a wireless network and others with laptops etc can connect to it them you should also be able to with the Apple TV. It seems to me that the campus IT guy needs to give you the name of the wireless network (SSID) and a  password so you can connect.
    Then go to Apple TV General/Network/Configure Wi-fi and follow instructions. The IT person should tell you what encryption they use WEP, WPA, WPA2 etc. Probably WPA2. You'll need this infor to connect.
    Then go to
    Apple TV General/Network/Configure TCP/IP and you will probably tell it to use DHCP and it should connect you to the campus network.
    After that you can sign into the iTunes store etc.
    Or am I missing something here?
    Pat.

  • Siri cannot find anything on Wolfram Alpha (says "I can't seem to find ... on Wolfram Alpha")

    When I use Siri to find any kind of scientific information, it always uses bing. And when I ask to find information on Wolfram Alpha, it says that it can't seem to find that on Wolfram Alpha.

    I don't know why the difference. I  just asked what's 10 times 10 and the answer was from Wolfram Alpha. When I asked for information on Wolfram Alpha , I got the I have no information on Wolfram Alpha answer. Maybe the question needs to be phrased different . Try use wolfram alpha to tell me the distance to the sun.

  • I can't seem to find a function to check to see if a connection was success

    Hello everyone. I'm running into 2 problems that I can't seem to find functions for after reading the java API on socket and serverSocket.
    If a client closed a connection on my server, like if someone telnets into my server, then closes the console, i get the following:
    Event from: localhost-> null
    Exception in thread "Thread-1" java.lang.NullPointerException
         at server.MultiThreadServer.run(MultiThreadServer.java:62)
         at java.lang.Thread.run(Thread.java:803)This is the check i do to avoid getting this, but it doesn't seem to work:
    //close a connection on this condition.
                  if(csocket.getRemoteSocketAddress() == null || input.equals("bye"))
                       System.out.println("Connection closed by client.");
                       break;
                  }If I attempt to run a server socket on a socket that is already being used, I'd like to print out a statement saying its being used and do something about it, like let the user enter another port number. Right now I have:
    public class MainTest {
           public static void main(String args[]) throws Exception
                //get console input
                BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));  
                System.out.println("Enter port to run server on: ");
                String input = stdin.readLine();
                int servPort = Integer.parseInt(input);
                try
                ServerSocket ssock = new ServerSocket(servPort);
                System.out.println("Listening on : " + ssock);
                  while (true) {
                    //waiting for client to connect to server socket
                    Socket sock = ssock.accept();
                    System.out.println(sock + " connected.");
                    //get host information
                    InetAddress clientIa = sock.getInetAddress( );
                    String clientName = clientIa.getHostName();
                    String clientIp = clientIa.getHostAddress();
                    int localPort = sock.getLocalPort();
                    System.out.println("hostname: "+clientName  +
                              '\n' + "Ip address: " + clientIp
                              +":"+ localPort + "\n\n");
                    new Thread(new MultiThreadServer(sock)).start();
                catch(IOException e)
                     e.printStackTrace();
    }Me catching the IOException is too broad....if anything goes wrong it will spit out the error and stop program execution as it should.
    I tried
    if(ssock.isClosed()) { System.out.println("Socket is being used, try another");but it doesn't work.
    Also inside my server program I'm connecting to another server and if that other server isn't running I'd like to print out an error message stating that.
    Right now it will just say: Connection Refused if its not running.
    here's that code:
    public class MultiThreadServer implements Runnable {
         Socket csocket;
      MultiThreadServer(Socket csocket) {
        this.csocket = csocket;
      public void run() {
        try {
          //setting up channel to recieve events from the omnibus server
             BufferedReader in= new BufferedReader(
                        new InputStreamReader(
                        csocket.getInputStream()));
             //This socket will be used to communicate with the reciever
             //we will need a new socket each time because this is a multi-threaded
             //server thus, the (outputServ) will need to be
             //multi threaded to handle all the output.
             Socket outputServ = new Socket("localhost",1234);
             if(outputServ.getLocalSocketAddress() == null)
                  System.out.println("OutputServer isn't running...");
             //Setting up channel to send data to outputserv
              PrintWriter out
                   = new PrintWriter(
                   new OutputStreamWriter(
                   outputServ.getOutputStream()));
             while(true)
                  //accepting events from omnibus server and storing them
                  //in a string for later processing.
                  String input = in.readLine();
                  //accepting and printing out events from omnibus server
                  //also printing out connected client information
                  System.out.println("Event from: " + csocket.getInetAddress().getHostName()
                            +"-> "+ input +"\n");
                  out.println(input);
                  out.flush();
                  //close a connection on this condition.
                  if(csocket.getRemoteSocketAddress() == null || input.equals("bye"))
                       System.out.println("Connection closed by client.");
                       break;
             //cleaning up
          in.close();
          out.close();
          outputServ.close();
          csocket.close();
        } catch (IOException e) {
          System.out.println(e);
          e.printStackTrace();
    }Both those conditions don't seem to work, if a client closes a connection it doesn't respond and if the server isn't running on port 1234, i get that connection refused.
    Any help would be great!

    Thanks for the help guys!
    adding -1 to the stream worked perfect:
    i have it like this:
         String input;
         //accepting events from omnibus server and storing them
         //in a string for later processing.
         while ((input = in.readLine()) != null)  
                  //accepting and printing out events from omnibus server
                  //also printing out connected client information
                  System.out.println("Event from: " + csocket.getInetAddress().getHostName()
                            +"-> "+ input +"\n");
                  out.flush();
                  out.println(input);
                  out.flush();
                  //close a connection on this condition.
                  if(in.read() == -1)
                       System.out.println("Connection closed by client.");
                       break;
        //cleaning up
          in.close();
          out.close();
          outputServ.close();
          csocket.close();
        } I had one last question, when I catch a socketExpection, such as, if the user enters a port that is already in use, I would like to give them the chance to enter another port before stopping the program.
    I'm not sure how I can do this with exceptions though, like i have:
      //setting up sockets
                ServerSocket ssock = null;
                Socket sock = null;
                try
                //setting up server to run on servPort
               ssock = new ServerSocket(servPort);
           catch (SocketException e )
                     System.out.println ("Socket error: " + e);
                }now inside that catch block, is there a way for me to allow the user to enter another socket and try again? or am I approaching this wrong?
    while(true)
    if the port is already been used
    allow the user to enter in another port number
    else
    break;
    }I'm confused on how this will work though becuase:
    once it hits this line:
    ssock = new ServerSocket(servPort);the exception is thrown and it jumps down to the catch block,
    now inside that catch block how would I let the user enter in another port number and try this line of code again?
    ssock = new ServerSocket(servPort); //this time with the new servPort number?
    Thanks!

  • Genius Bar lost a business file. Can't seem to find it in Time Machine...Got Ideas?

    Genius Bar lost a business financial file. Can't seem to find it in Time Machine. Gone back several days...Got Ideas?

    You need to give me more info..
    What did you take the Mac to the genius for??
    What did they do to it?
    Did you have TM setup at defaults doing backups hourly?
    Are you using a Time Capsule? Did you ever backup the time capsule??
    Please do a backup of your Time Machine backup right now.. in TC plug in a suitable sized USB drive and do an archive.. you can do nothing else while this is happening but it is crucial for you to have another copy of whatever you have.
    Archive is a bit slow.. and the backup is slightly less useful.
    The fastest method is plug the USB into your computer and copy and paste  the backups.backupdb directly to the USB drive. It should copy at around 60GB/hr so calculate how long that will take. See instructions here. http://pondini.org/TM/18.html Assuming you are using a TC then you use method 4.. copying from a Network backup to local drive.
    Never work directly from the original backup .. work just from this copy so anything you do can be reversed or recovered.
    Read very carefully the methods of restoring files from TM.. it is a bit out of date but Pondini has the best details.
    So Q14-17 here. http://pondini.org/TM/FAQ.html
    You can do a full recovery of the backup to a USB drive.. and then search for your file in more normal way.
    Get professional help.. and this is where you need data recovery people who are familiar with apple TM backup format. Check local apple store or perhaps better local Apple independent repair business that are used to handling this kind of event.
    Also talk to the company that makes the software as they must have to deal with people who manage to lose, corrupt or in some other way ruin their data and need to recover.. see what hints they can give you.
    Surely at some point you pass your info to your accountant in the form of a computer backup file from your accounting package.
    I have to admit I am surprised if you never backed up your business data file to a USB stick and put it in a filing cabinet at home or a hard disk at a friends place.. Cloud storage for your business files.. Did you depend totally on TM for backups? You never planned for a fire or theft of your computer and TC?? Or what has happened.. loss of computer files and failure of the backup? No greater teacher than the burnt hand that touching hot stuff isn't a good idea. Sorry .. it is a very hard lesson.. but electronic data storage on magnetic media is ever one byte away from being gone forever.. !!

  • My two year old has managed to invert the colour on a MacBook, so that everything appears in negative. How can this be reversed? I have explored Preferences, but can;t seem to see anything relevant.

    My two year old has managed to invert the colour on a MacBook, so that everything appears in negative. How can this be reversed? I have explored Preferences, but can;t seem to see anything relevant.

    Yes, he does have agile fingers and they are everywhere! I managed to find a solution to the problem by going to the Language section and resetting to black on white...
    All bets and thanks for the response
    jem

  • Hi, is their an app that let's me store my C.V in photos as I have my C.V on file but can't seem to attach anything apart from photos

    Hi, is their an app that let's me store my C.V in photos as I have my C.V on file but can't seem to attach anything apart from photos

    Two to have a look at at iUploader and iCab Mobile, but you may well find others in the app store.

  • Where is my Theater clip located on my mac, can't seem to find it anywhere but it shows up and plays in my Theatre just fine?

    I have a video clip in Theatre that plays fine, but I can't find the folder and when I try to save it as a file or share it, it brings up a wrong clip.  Where would that file be located if it is showing up in my Theatre library.  I've tried searching for it based on it's file name but my mac can't seem to find it anywhere.

    It comes as part of iLife box set.  Apple retired iDVD for reasons only they know.  You won't find it as a stand-alone product on apple's website.  If you do get the box set, only install iDVD.  The versions on iPhoto, Garage Band are old.

  • I can't seem to find any books to purchase on Adobe Media Server 5 or even tutorials.

    I can't seem to find any books to purchase on Adobe Media Server 5 or even tutorials, is there a reason for this? Is AMS gone by the wayside?

    I can't find my photos that I've just downloaded.
    Look in Last Import
      I can't find my photo information (i.e. shutter speed, aperture, etc).
    Click on the circled "i" in edit mode
    There is no histogram.  I can only find about 3 sliders to adjust color, tint, etc.
    In edit mode click on "adjust" then "add" and check the options you want to see
    The crop function is difficult to use.
    Ok - that is a personal opinion - I like it better
    I cannot geotag my photos any longer.
    That is correct - hopefully it will be added with an update - for now you have to do it prior to Import - HoudahGeo hopes to be able to do it directly to the Photos library later also and is a good solution for Geotagging
    Right now, I feel like I'm being forced to use Adobe Photoshop and Lightroom to get the tools I need to edit my photos.
    Forced? Someone is there with a gun? You are not being Forced to do anything - you can do what ever you want including continue to use iPhoto - or even post invalid winning complains instead of acting to resolve your concerns - your choice - do what you want
    LN

  • After updating to the latest version of Firefox on my Mac there is no progress bar for the page load. I really miss this feature and can't seem to find a way to obtain it.

    The page load progress bar that was on the lower right of the window is no longer there. After updating to the latest version of Firefox on my Mac there is no progress bar for the page load. I really miss this feature and can't seem to find a way to obtain it. The tab has a circular progress wheel but this is useless for determining a stuck or slow loading page.
    PLEASE NOTE: I am typing this in from a Windows based work computer but am asking about my Apple MacBook Pro that i use at home.

    Firefox 4 saves the previous session automatically, so there is no longer need for the dialog asking if you want to save the current session.<br />
    You can use "Firefox > History > Restore Previous Session" to get the previous session at any time.<br />
    There is also a "Restore Previous Session" button on the default <b>about:home</b> Home page.<br />
    Another possibility is to use:
    * [http://kb.mozillazine.org/Menu_differences Firefox (Tools) > Options] > General > Startup: "When Firefox Starts": "Show my windows and tabs from last time"

  • I created a new Apple ID for iCloud on my iPhone, but I can't seem to find a way to "sign out" or "log out" of that Apple ID (for iCloud) to sign in with another Apple ID. The only account login I could change was the Store. How do I "log out"

    I created a new Apple ID for iCloud on my iPhone, but I can't seem to find a way to "sign out" or "log out" of that Apple ID (for iCloud) to sign in with another Apple ID. The only account login I could change was the Store.
    How do I "log out" or "sign out" of iCloud on my iPhone? There is an option to delete the account, but I just want to log off. I want to keep the account name for future use.

    @fernandamagalhaes
    It looks like the article below has the information you are looking for.
    iCloud: Change iCloud feature settings
    http://support.apple.com/kb/PH2613
    Turn off iCloud completely
    Depending on whether you want to stop using iCloud on all or only some devices, do one or more of the following:
    On your iOS device’s Home screen, go to Settings > iCloud, then at the bottom of the screen, tap Delete Account.
    Note:   If you delete your iCloud account, iCloud will no longer back up your iOS data. You can still back up your device in iTunes (for more information, open iTunes and choose iTunes > Help). 
    On your Mac, open iCloud preferences, then click Sign Out.
    If your Mac has OS X v10.7.5 and you turn off iCloud, your calendar information and reminders aren’t stored locally in iCal. If you want to retain your calendar and reminder information, you need to back it up before turning off iCloud. For more information, see the Apple Support article iCloud: Calendar & reminder data removed from Calendar and Reminders or iCal when disabling iCloud Calendar.
    On your Windows computer, open the iCloud Control Panel, then click Sign Out.
    Note:   If you turned on automatic download of music, app, or book purchases (in iTunes preferences or in Settings on your iOS device), your iTunes purchases are still downloaded to your devices.
    Set up iCloud on your devices

  • I have an older Power Mac G5 Quad, and my video card just went out. I am trying to find a video card that will work for my Power Mac. I have duel screens but I can't seem to find the appropriate video card

    I have an older Power Mac G5 Quad, and my video card just went out. I am trying to find a video card that will work for my Power Mac. I have duel screens but I can't seem to find the appropriate video card. The serial number on my computer is: RM620603R6W. Apple won't help me because the computer is older than suggested. Please give me the exact video card that will work best for my computer.

    Hi Mike, make sure the card has Mac ROM, or is a PC card with Mac ROMs flashed to it...
    G5 PCIe options are listed here:
    http://www.jcsenterprises.com/Japamacs_Page/Blog/71BBF3EF-9713-4C53-8B80-26771F8 A4087.html

  • I've downloaded CS6 Master Collection but only see The Photoshop icon.  I can't seem to find the other programs, except on "uninstall programs" How do I open and run the others?

    I've downloaded CS6 Master Collection but only see The Photoshop icon.  I can't seem to find the other programs, except on "uninstall programs" How do I open and run the others?

    How about you give us some real information.
    Did you install the software? What operating system?

  • Every time I try to install itunes on my PC I get the following message, and I can't seem to find a solution. Any help out there?? "There is a problem with this Windows Installer package. A program required for this install to complete could not be run."

    Every time I try to install itunes on my PC I get the following message, and I can't seem to find a solution. Any help out there?? "There is a problem with this Windows Installer package. A program required for this install to complete could not be run."

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

Maybe you are looking for

  • 802.1x authentication

    I was wondering, If you are using a SmartCard to authenticate to the network using the CSACS 5.0 software, is it possible to set the ACS to look at other information besides the three given options.  I can get the ACS to take the e-mail address off o

  • Error code 0x80070002

    We are trying to install Microsoft Windows 2008 R2 SP1 in our Dell PowerEdge T110 Server. The server uses S300 Dell PowerEdge RAID Controller which requires driver installation which we did on each installation using the driver provided by DELL via a

  • I can't upgrade. my system calls for an authorization code and I do not know it

    I purchased a used computer, when I try to upgrade it asks for a authorization code. I am clueless. I have tried numerous useless codes. Do you have a suggestion as to getting around this?

  • HP Mini 1000 Bios Password

    I bought a used HP Mini 1000. I cannotget passed the password. Code is CNU9135Z9J. Can you help me? This question was solved. View Solution.

  • Trying to code a ethereal-like application

    Hi all. I am trying to code a mini-etheral like packet logging/attacks detection utility for security purposes. It will be very easy to do it in C but i wish to do it in Java. I want to print all the packet dump in hexadecimal on a notepad or text ed