New to JAVA, but old school to programming

Objects & Classes & Methods, Oh my!
I'm pretty new to java, but I've been programming in several languages over the years. I thought it was about time to update my skill set, especially with the job market as it is today. I wanted to go JAVA because it's not specific to any environment.
I picked up a begining JAVA book and was a little confused. When I was learning programming a program was called a program. a peice of code in a program called by a statement was called a subroutine (it was performed then control returned to the calling line and continued).
Now I'm trying to make sense of everything I have read so far and trying to relate it back to my old school of thinking. I was hoping it would make it easier to retain and I could expand it as I learn and possibly realize that it IS different. I know it's a new way of thinking, but stay with me for minute.
What I used to call a program is now a CLASS in JAVA (this can be a collection of code or other objects). A sub-routine in a CLASS is a Method. I know that the language part will come as I use it since I understand if's then's and whatever you use to gosub or goto, but I want to make sure I have down the lingo before I go to deep.

I have no idea how you can compare Java to Cobol.
DataFlex? How about that! In about '84 I switched to
DataFlex from dBaseII. In '91 DataFlex changed from
procedural to OOP. It took most of us at least a year
to adjust, and then some to write concrete code. It
was tough. They had bugs and we were limited with DOS.
BUT, it was a great OOP training experience. Anyhow,
needless to day Java is miles ahead on all fronts.Small world. I was stuck in the old DataFlex Ver 2.3 at that time. The company I worked for had the newer OOP package. I did get to work with it some, but not enough to become totally familiar with it. We started to move out of DataFlex towards PowerBuilder towards the end of 1995. I did get some OOP from that experience, but again only enough to learn about global variables, instance variables, and a few other items. I hoping that I will be able to get the solid OOP background that I need from JAVA since I hear through the grapevine that it may be a new tool that we will be looking at to enhance our programming. I was looking at PERL but even the PERL programmers we have agree that JAVA is more scalable.

Similar Messages

  • New to Java - why won't my program run ?

    Hi
    I am new to Java - this compiles but does not run - any suggestions please ?
    class ThinkofANumberApp extends basic{
         public static void main (String param[]) throws Exception
         input source = new input ();
         output sink = new output ();
         int result = source.readint();
         //list number questions for numbers
              sink.writeln("Think of a number");
              source.readln();
              sink.writeln("Multiply it by 5");
              source.readln();
              sink.writeln("Add 6");
              source.readln();
              sink.writeln("Multiply it by 4");
              source.readln();
              sink.writeln("Add 9");
              source.readln();
              sink.writeln("Multiply it by 5");
              source.readln();
              sink.writeln("Type the final result");
              sink.write("My \"guess\" is that your"
              + " original number was ");
              sink.writeln((result-165)/100);
    Thanks in advance.
    Nadjie

    What is "input" and "output" and have you included these classes in your classpath?

  • I restored my ipod and used a new apple id but old id is stuck in ipod?

    my old apple id i think got hacked, anyways apple disabled it. i forgot my security answers so i thought i'd just make a new one. i restored my ipod and made a new apple id, but when i go to update apps or get new ones my old apple id seems to be stuck there? it's the only one that pops up when i have to confirm my purchase. i've tried signing out and signing back in but nothing works. i don't know why it's doing this considering i did restore my ipod
    HEEELP it's been like this for 2 months now

    - Apps are locked to the account that purchased them. Also, they can't be transfered to another account.
    - To update apps you have to sign into the account that purchased the apps. If you have apps that need updating purchased from more than one account you have to update them one at a time until the remaining apps were purchased from one account.
    Thus you will not be able to update those apps unless you can log into the account that pruchased them

  • I'm new to Java. Whats the easiest program to make games?

    I'm a moderately experience flash actionscript 3 developer, so i know how to program.
    I just want to know a developers kit that is good for making simple 2d games. Are there kits, that help you with the graphics stuff, like flash does? Because i suppose in Java you have to load all the sprites etc mannually?
    So i'm looking for an easy developer's kit for Java games.

    omniscient wrote:
    game maker is very limited. I want to use the java language.Okay but why do you want to use java? What do you think it offers you over something like GameMaker (especially if you're relying on prebuilt libraries)? If we know your actual goals (what kind of game do you want to make? How do you plan to get started? How much programming do you already know?), we can better help you.
    I'll check the tutorial.Always a good start. If you're unfamiliar with java in general, I wouldn't touch anything GUI-related until you master the [basic tutorials|http://java.sun.com/docs/books/tutorial/java/index.html] first.
    But I don't understand why you're so negative. What's wrong with wanting to use a kit thats easy- to use, and has all the basic stuff ready for you?I didn't mean to come off as negative. The problem with using a "kit" is that it gets in the way of actually learning how to program. I'd recommend getting a really basic game going on your own (think pong), and then worry about adding on to it using third party libraries. Learning how to do the basics (which really aren't that hard to start) will give you a better idea of what you need: physics engine? More accurate collision detection? Special effects? Smoother animation? Artificial intelligence? The list is endless, and I doubt you'll find all of it in one prebuilt kit. What fun would that be anyway!
    Ofcourse i know i dont ahve to draw pixel per pixel, i was exaggerating.Ok phew, you had me worried for a second.
    All this being said, I love seeing what other people come up with. Keep us posted on your progress, and feel free to ask questions as you go along.

  • I new to java but how do you load different settings for different browers?

    Let's say i want the page to be font size 6 on FF but size 8 on IE. I know there is a code like "if firefox" but i'm not sure how to set it up.

    I agree with the previous posts. I think it would be better to learn the fundamentals rather than spend time tweeking a web page for different browsers.
    A java web site is made up of several technologies in addition to java such as javascript, xhml, sql, tomcat, etc, etc in addition to java specialties such as JSP and Servlets that you should learn before tweeking a web page. I suggest reading whole books on these topics such as starting with 'Thinking in Java' (I wonder if I can get a commission from the authors for recommending their book so often in these posts?)

  • New member with a old school 50AX60 problem

    I have a old 50AX60 rear projection TV with sound and no picture. The video out RCA jack works fine, (tested with a separate monitor) but I have no picture on the TV screen. I am looking for help/suggestions from the group. I have basic knowledge and tools, but cannot find a free service manual download anywhere. Is this old clunker even worth my time and effort?
    THX
    Mike

    Hi Mike,
    Projection system repairs maybe a little esoteric for a consumer electronics users forum, but it sure doesn't hurt to ask.
    You may want to give avsforum.com and tv-forums.com a shot.
    Jim

  • Creative Cloud says new Photoshop installed but old version remains

         Today, I attempted to update Photoshop CC (2014) and Bridge to new versions.
    The installation appeared to complete and Creative Cloud said the apps are up to date, but they remain the previous versions.
    What can I do to rectify this?

    Well, I must have been mistaken because it says there is no newer version -- and yet when I updated to the new Lightroom CC this evening the Creative Cloud App said there were also updates to Photoshop CC 2014 and to Bridge. And then it said it installed these.
    And my applications folder shows changes to the contents of the Photoshop and Bridge folders at the time I did the updates.
    However the apps themselves remain the same with Photoshop still being 2014.2.2.
    I apparently leapt to the wrong conclusion.
    Thanks very much for your help.

  • How do I remove my personal text msgs from appearing on my new iPad.  Rec for Christmas didn't realize texts appeared on iPad, changed settings, new ones didn't appear but old ones still on it.

    New iPad showing my iPhone texts, changed settings new texts stopped but old ones still appear on iPad .  It is a family iPad and don't want kids to see text from adults even g rated, glad they didn't see Christmas texts with present pictures and questions from relatives.

    As far as I know, deleting the messages on the iPad should not affect them on the iPad. I delete messages on one device and it doesn't affect the messages on the other device since they are stored locally on the device. And ... I am using my iPhone number as the contact address on both devices,
    You can create another ID for texting on the iPad, but it's not an absolute must. You just need to use your Apple ID email address, or any other working email address for that matter - as the contact at address on the iPad for texting. As long as you use the iPhone number on the phone and the email address on the iPad, texting paths shall never cross.
    this should be of some help.
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • I am completealy new at java.  HELP!!!!

    K, hi, well, i am experienced in HTML and Macromedia Flash, and Game Maker 5, a shit game maker prog. Ne ways, i admire games like RuneScape and would like to know how i would get around to making one. I know that i can't just jut out and make a rs type game. But i would like to know where to start? Are there programs i need to buy or DL, or are there books? And btw, is Java like HTML where u sit in front of a notepad prog, and type? or is it like u type and see whats happening? or do u add objects and give them properties..... Its a whole lot to ask! lol, Help me out.......try to answer it all.

    Resources for Beginners
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java. This one has been getting a lot of very positive comments lately.
    But i would like to know where to start? With reading the "New To Java" tutorials.
    Are there programs i need to buy or DLTo start with you only need Notepad, and the JDK (AKA the Java SDK), downloadable from http://java.sun.com/j2ee/1.4/download-sdk.html
    Later on, you might also want an IDE, or maybe just a better text editor. But for now, just stick with Notepad.
    And btw, is Java like HTML where u sit in front of a notepad prog, and type?Mostly, after writing something (in Notepad), then compile it, then run it. And extra step than HTML has.
    or is it like u type and see whats happening?You can also get interactive shells for it, but for now, do not worry about them.
    r do u add objects and give them propertiesYou can get IDEs which let you work this way, but for now, do not worry about them.

  • I signed up for the edge program and need to send back my old phone.  The instructions say I need to put it in the edge bag provided with my new phone order, but no bag is in the box.  Can I get one at a store?  Please respond!!

    I signed up for the edge program and need to send back my old phone.  The instructions say I need to put it in the edge bag provided with my new phone order, but no bag is in the box.  Can I get one at a store?  Please respond!!

        monkeybuttqueen,
    Thank you so much for reaching out to us today. I hope you are enjoying the new device! I do apologize that you didn't get the proper info sent to you to send back your old device. You can always print a label online from My Verizon. You can do that at www.verizonwireless.com/printlabel Pleaes keep us posted if you have any questions or concerns.
    KevinR_VZW
    Follow us on Twitter @VZWSupport

  • I am looking to update to a new imac with intel core processor. I am still old school with a powerbook G4. I want to know if I am going to have to upgrade all graphic programs right away after buying new computer. Thanks.

    I am looking to update to a new imac with intel core processor. I am still old school with a powerbook G4:)
    I want to know if I am going to have to upgrade all graphic programs right away after buying new computer.
    Trying to weigh ALL costs involved.
    Thanks for any advice!!!

    Anything you have that is powerpc code only will not run on a new machine.  OS X 10.8 has no support for powerpc code (universal binary programs should be fine).
    Other than that warning, without knowing exactly what programs you have, and what version you are on, it is hard to say whay will or will not migrate alright.
    you might need to do some web searching and check apps at sites like roaringapps or on the programs Company web site.
    http://roaringapps.com/apps:table

  • New TO JAVA Programming

    Dear Forummembers,
    I am student doing postgraduate studies in IT.i have some queries related to one of my programming staff.i am very much new into Java programming and i am finding it a bit difficult to handle this program.The synopsis of the program is given below -
    You are required to design and code an object-oriented java program to process bookings for a theatre perfomance.
    Your program will read from a data file containing specifications of the performance,including the names of the theatre, the play and its author and the layout of the theatre consisting of the number of seats in each row.
    It will then run a menu driven operation to accept theatre bookings or display the current
    status of seating in the theatre.
    The name of the file containing the details of the performance and the theatre should be
    provided at the command line, eg by running the program with the command:
    java Booking Theatre.txt
    where Theare.txt represents an example of the data file.
    A possible data file is:
    Opera
    U and Me
    Jennifer Aniston
    5 10 10 11 12 13 14
    The data provided is as follows
    Line 1
    Name of the Theatre
    Line 2
    Name of the play being performed
    Line 3
    Name of the author of the play being performed
    Line 4
    A list of the lengths (number of seats) of each row in the theatre, from front to
    back.
    The program must start by reading this file, storing all the appropriate parameters and
    establishing an object to accept bookings for this performance with all details for the theatre
    and performance.
    The program should then start a loop in which a menu is presented to the user, eg:
    Select from the following:
    B - Book seats
    T - Display Theatre bookings
    Q - Quit from the program
    Enter your choice:
    And keep performing selected operations until the user�s selects the quit option, when the
    program should terminate.
    T - Display Theatre bookings
    The Display Theatre Bookings option should display a plan of the theatre. Every available
    seat should be displayed containing its identification, while reserved seats should contain an
    Rows in each theatre are indicated by letters starting from �A� at the front. Seats are
    numbered from left to right starting from 1. A typical seat in the theatre might be designated
    D12, representing seat 12 in row D.
    B - Book seats
    The booking of seats is to offer a number of different options.
    First the customer must be asked how many adjacent seats are
    required. Then start a loop offering a further menu of choices:
    Enter one of the following:
    The first seat of a selected series, eg D12
    A preferred row letter, eg F
    A ? to have the first available sequence selected for you
    A # to see a display of all available seats
    A 0 to cancel your attempt to book seats
    Enter your selection:
    1. If the user enters a seat indentifier such B6, The program should attempt to
    reserve the required seats starting from that seat. For example if 4 seats are
    required from B6, seats B6, B7, B8 and B9 should be reserved for the customer,
    with a message confirming the reservation and specifying the seats reserved..
    Before this booking can take place, some testing is required. Firstly, the row
    letter must be a valid row. Then the seat number must be within the seats in the
    row and such that the 4 seats would not go beyond the end of the row. The
    program must then check that none of the required seats is already reserved.
    If the seats are invalid or already reserved, no reservation should be made and the
    booking menu should be repeated to give the customer a further chance to book
    seats.
    If the reservation is successful, return to the main menu.
    2. The user can also simply enter a row letter, eg B.IN this case, the program should
    first check that the letter is a valid row and then offer the user in turn each
    adjacent block of the required size in the specified row and for each ask whether
    the customer wants to take them. Using the partly booked theatre layout above, if
    the customer wanted 2 seats from row B, the customer should be offered first:
    Seats B5 to B6
    then if the customer does not want them:
    Seats B10 to B11
    and finally
    Seats B11 to B12
    If the customer selects a block of seats, then return to the main menu. If none are
    selected, or there is no block of the required size available in the row, then report
    that no further blocks of the required size are available in the row and repeat the
    booking menu.
    3. If the user enters a ? the program should offer the customer every block of seats
    of the required size in the whole theatre. This process should start from the first
    row and proceed back a row at a time. For example, again using the partially
    booked theatre shown above, if the user requested 9 seats, the program should
    offer in turn:
    Seats A1 to A9
    Seats C1 to C9
    Seats C2 to C10
    Seats E3 to E11
    Seats E4 to E12
    If the customer selects a block of seats, then return to the main menu. If none are
    selected, or there is no block of the required size available in the whole theatre,
    then report that no further blocks of the required size are available and repeat the
    booking menu.
    4. If the user enters a # the program should display the current status of the seating
    in the theatre, exactly the same as for the T option from the main menu and then
    repeat the booking menu.
    5. If the user enters a 0 (zero), the program should exit from the booking menu back
    to the main menu. If for example the user wanted 9 seats and no block of 9 was
    left in the theatre, he would need to make two separate smaller bookings.
    The program should perform limited data validation in the booking process. If a single
    character other than 0, ? and # is entered, it should be treated as a row letter and then tested
    for falling within the range of valid rows, eg A to H in the example above. Any invalid row
    letters should be rejected.
    If more than one character is entered, the first character should be tested as a valid row letter,
    and the numeric part should be tested for falling within the given row. You are NOT
    required to test for valid numeric input as this would require the use of Exception handling.
    You are provided with a class file:
    Pad.java
    containing methods that can be used for neat alignment of the seat identifiers in the theatre
    plan.
    File Processing
    The file to be read must be opened within the program and if the named file does not exist, a
    FileNotFoundException will be generated. It is desirable that this Exception be caught and
    a corrected file name should be asked for.
    This is not required for this assignment, as Exception handling has not been covered in this
    Unit. It will be acceptable if the method simply throws IOException in its heading.
    The only checking that is required is to make sure that the user does supply a file on the
    command line, containing details of the performance. This can be tested for by checking the
    length of the parameter array args. The array length should be 1. If not, display an error
    message telling the user the correct way to run the program and then terminate the program
    System.exit(0);
    The file should be closed after reading is completed.
    Program Requirements
    You are expected to create at least three classes in developing a solution to this problem.
    There should be an outer driving class, a class to represent the theatre performance and its
    bookings and a class to represent a single row within the theatre.
    You will also need to use arrays at two levels. You will need an array of Rows in the Theatre
    class.
    Each Row object will need an array of seats to keep track of which seats have been reserved.
    Your outer driving class should be called BookingOffice and should be submitted in a file named BookingOffice.java
    Your second, third and any additional classes, should be submitted in separate files, each
    class in a .java file named with the same name as the class
    I am also very sorry to give such a long description.but i mainly want to know how to approach for this program.
    also how to designate each row about it's column while it is being read from the text file, how to store it, how to denote first row as row A(second row as row B and so on) and WHICH CLASS WILL PERFORM WHICH OPERATIONS.
    pls do give a rough guideline about designing each class and it's reponsibilty.
    thanking u and looking forward for your help,
    sincerely
    RK

    yes i do know that........but can u ppl pls mention
    atleast what classes shud i consider and what will be
    the functions of each class?No, sorry. Maybe somebody else will, but in general, this is not a good question for this forum. It's too broad, and the question you're asking is an overall problem solving approach that you should be familiar with at this point.
    These forums are best suited to more specific questions. "How do I approach this homework?" is not something that most people are willing or able to answer in a forum like this.

  • New to Java and need help with this program..please!

    I'd really appreciate any helpful comments about this program assignment that I have to turn in a week from Friday. I'm taking a class one night a week and completely new to Java. I'd ask my professor for help, but we can't call him during the week and he never answers e-mails. He didn't tell us how to call from other classes yet, and I just can't get the darn thing to do what I want it to do!
    The assignment requirements are:
    1. Change a card game application that draws two cards
    and the higher card wins, to a Blackjack application
    2. Include a new class called Hand
    3. The Hand class should record the number of draws
    4. The application should prompt for a number of draws
    5. The game is played against the Dealer
    6. The dealer always draws a card if the dealer's hand total is <= 17
    7. Prompt the player after each hand if he wants to quit
    8. Display the total games won by the dealer and total and the total games wond by the player after each hand
    9. Display all of the dealer's and player's cards at the
    end of each hand
    10. Player has the option of drawing an additional card after the first two cards
    11. The Ace can have a value of 11 or 1
    (Even though it's not called for in the requirements, I would like to be able to let the Ace have a value of 1 or an 11)
    The following is my code with some comments about a few things that are driving me nuts:
    import java.util.*;
    import javax.swing.*;
    import java.text.*;
    public class CardDeck
    public CardDeck()
    deck = new Card[52];
    fill();
    shuffle();
    public void fill()
    int i;
    int j;
    for (i = 1; i <= 13; i++)
    for (j = 1; j <= 4; j++)
    deck[4 * (i - 1) + j - 1] = new Card(i, j);
    cards = 52;
    public void shuffle()
    int next;
    for (next = 0; next < cards - 1; next++)
    int rand = (int)(Math.random()*(next+1));
    Card temp = deck[next];
    deck[next] = deck[rand];
    deck[rand] = temp;
    public final Card draw()
    if (cards == 0)
    return null;
    cards--;
    return deck[cards];
    public int changeValue()
    int val = 0;
    boolean ace = false;
    int cds;
    for (int i = 0; i < cards; i++)
    if (cardValue > 10)
    cardValue = 10;
    if (cardValue ==1)     {
    ace = true;
    val = val + cardValue;
    if ( ace = true && val + 10 <= 21 )
    val = val + 10;
    return val;
    public static void main(String[] args)
    CardDeck d = new CardDeck();
    int x = 3;
    int i;
    int wins = 1;
    int playerTotal = 1;
    do {
    Card dealer = (d.draw());
    /**I've tried everything I can think of to call the ChangeValue() method after I draw the card, but nothing is working for me.**/
    System.out.println("Dealer draws: " + dealer);
    do {
    dealer = (d.draw());
    System.out.println(" " + dealer);
    }while (dealer.rank() <= 17);
    Card mine = d.draw();
    System.out.println("\t\t\t\t Player draws: "
    + mine);
    mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
    do{
    String input = JOptionPane.showInputDialog
    ("Would you like a card? ");
    if(input.equalsIgnoreCase("yes"))
         mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
         playerTotal++;
         else if(input.equalsIgnoreCase("no"))
    System.out.println("\t\t\t\t Player stands");
         else
    System.out.println("\t\tInvalid input.
    Please try again.");
    I don't know how to go about making and calling a method or class that will combine the total cards delt to the player and the total cards delt to the dealer. The rank() method only seems to give me the last cards drawn to compare with when I try to do the tests.**/
    if ((dealer.rank() > mine.rank())
    && (dealer.rank() <= 21)
    || (mine.rank() > 21)
    && (dealer.rank() < 22)
    || ((dealer.rank() == 21)
    && (mine.rank() == 21))
    || ((mine.rank() > 21)
    && (dealer.rank() <= 21)))
    System.out.println("Dealer wins");
    wins++;
         else
    System.out.println("I win!");
    break;
    } while (playerTotal <= 1);
    String stop = JOptionPane.showInputDialog
    ("Would you like to play again? ");
    if (stop.equalsIgnoreCase("no"))
    break;
    if (rounds == 5)
    System.out.println("Player wins " +
    (CardDeck.rounds - wins) + "rounds");
    } while (rounds <= 5);
    private Card[] deck;
    private int cards;
    public static int rounds = 1;
    public int cardValue;
    /**When I try to compile this nested class, I get an error message saying I need a brace here and at the end of the program. I don't know if any of this code would work because I've tried adding braces and still can't compile it.**/
    class Hand()
    static int r = 1;
    public Hand() { CardDeck.rounds = r; }
    public int getRounds() { return r++; }
    final class Card
    public static final int ACE = 1;
    public static final int JACK = 11;
    public static final int QUEEN = 12;
    public static final int KING = 13;
    public static final int CLUBS = 1;
    public static final int DIAMONDS = 2;
    public static final int HEARTS = 3;
    public static final int SPADES = 4;
    public Card(int v, int s)
    value = v;
    suit = s;
    public int getValue() { return value; }
    public int getSuit() { return suit;  }
    public int rank()
    if (value == 1)
    return 4 * 13 + suit;
    else
    return 4 * (value - 1) + suit;
    /**This works, but I'm confused. How is this method called? Does it call itself?**/
    public String toString()
    String v;
    String s;
    if (value == ACE)
    v = "Ace";
    else if (value == JACK)
    v = "Jack";
    else if (value == QUEEN)
    v = "Queen";
    else if (value == KING)
    v = "King";
    else
    v = String.valueOf(value);
    if (suit == DIAMONDS)
    s = "Diamonds";
    else if (suit == HEARTS)
    s = "Hearts";
    else if (suit == SPADES)
    s = "Spades";
    else
    s = "Clubs";
    return v + " of " + s;
    private int value; //Value is an integer, so how can a
    private int suit; //string be assigned to an integer?
    }

    Thank you so much for offering to help me with this Jamie! When I tried to call change value using:
    Card dealer = (d.changeValue());
    I get an error message saying:
    Incompatible types found: int
    required: Card
    I had my weekly class last night and the professor cleared up a few things for me, but I've not had time to make all of the necessary changes. I did find out how toString worked, so that's one question out of the way, and he gave us a lot of information for adding another class to generate random numbers.
    Again, thank you so much. I really want to learn this but I'm feeling so stupid right now. Any help you can give me about the above error message would be appreciated.

  • I have got a new phone and my old phone was wiped.  I backed it up but where do i find my contacts list on iTunes?  Or should i be looking somewhere else?

    i have got a new phone and my old phone was wiped.  I backed it up but where can i find all my contacts?

    Unfortunately your other contacts may be lost.  Contacts are not saved in iTunes; they are only synced with iTunes to a supported program such as Outlook or mac Address Book.  If you don't have these, there are other options for backing up your contacts such as syncing them with iCloud or another service such as Google.  Syncing only partially saves contacts in the backup in order to preserve your favorites and recent call lists; it can't be relied on for backing up your entire contact list.

  • New to java - glitch in my program/game? should be a simple fix :)

    hey everyone, I'm a student who's new to java programming :) It's is also the first programming language that I'm learning. I know the basics, but nothing very complicated.
    I'm making a pong-like game, in an applet.
    As I was making the paddle and using a mouselistener to make it move vertically, I came across this problem, the paddle will move vertically with the mouse's position, but one end of my paddle will grow abnormally (I want it to stay the same size as it moves up and down)
    Here's my code: (I'm not using most of the mouselistener and keylistener classes yet, so you can ignore them. I'm guessing the problem is probably in one of the last classes, at the bottom)
    ypaddle is the variable used for getting the co-ordinates of the mouse and transferring them to the paddle itself
    // The "Ping" class.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    *Ping
    public class Ping extends Applet
        implements KeyListener, MouseListener, MouseMotionListener
        int width, height, x, ypaddle;
        Graphics g;
        char move;
         *Initializes variables
        public void init ()
            resize (700, 500);
            setBackground (Color.white);
            addKeyListener (this);
            addMouseListener (this);
            addMouseMotionListener(this);
        public void keyPressed (KeyEvent e)
        public void keyReleased (KeyEvent e)
        public void keyTyped (KeyEvent e)
        public void mouseEntered (MouseEvent e)
        public void mouseExited (MouseEvent e)
        public void mousePressed (MouseEvent e)
        public void mouseReleased (MouseEvent e)
        public void mouseClicked (MouseEvent e)
        public void mouseMoved (MouseEvent e)
            ypaddle = e.getY ();
            repaint();
        public void mouseDragged (MouseEvent e)
        public void paint (Graphics g)
            paddle (g, ypaddle);
         * Creates the paddle for hitting the ball
         *@param    y   value used to move the paddle vertically
        public void paddle (Graphics g, int y)
            g.fillRect (10, 10+y, 15, 60+y);
    } // Ping classI'm totally stumped, I've tried for 2 hours to find the problem, and I have a feeling it's something very simple that I'm passing over...
    If you have any questions about the variables or other things, please ask!
    And one last little quick question, is there a way I can restrict the movement of the paddle between two Y values? (i.e not higher than y=10 or lower than y=100)
    Thanks in advance :)

    soundweave wrote:
    I'm not exactly sure how to find out, Eh?
    You wrote this code:
    g.fillRect (10, 10+y, 15, 60+y);Do you understand what fillRect does? If I call fillRect(10, 20, 30, 40) where will that rectangle be drawn? If you don't know how to answer that, I don't see how you could have written that line of code.
    but here's some pictures of what happens ( I put in 0 and 80 as the y values in each picture, and left the code window open so you can see )I don't need to see them.
    Y at 0: [http://i731.photobucket.com/albums/ww314/len56/Untitled.jpg?t=1263077701|http://i731.photobucket.com/albums/ww314/len56/Untitled.jpg?t=1263077701]
    Y at 80: [http://i731.photobucket.com/albums/ww314/len56/Untitled2.jpg?t=1263077625|http://i731.photobucket.com/albums/ww314/len56/Untitled2.jpg?t=1263077625]
    So, given that the first one comes from fillRect(10, 10, 15, 60), (you get where that comes from I hope) and the second comes from fillRect(10, 90, 15, 150) (that too), does that not suggest that something is wrong with the numbers you're passing to fillRect? And since you have read the docs for fillRect and know what it does and what each of its parameters represents (right?), does it not suggest exactly what is wrong with those numbers?

Maybe you are looking for