I'am new at Java world, so please suggest me an IDE to work on .......

hi everybody !
This is my first post . I'am new in Java world, so please suggest me an IDE to work on ....... there are many IDE: Jbuilder, Jdevelopper, jRun, Sun Studio ... and then I don't know wich one is better (easer to use and to create good user interfaces), I'am designing a networking application surveying servers, hosts, routers ...and managing sms (sent to and received from Administrator).
The OS is Suse Linux Professsional, the DBSM is Oracle 10g .
I wait for your answers and thanks for your time

For a beginner JCreator is a nice but I think it is only for Windows.
For linux support have a a look at:
Netbeans:
If you are looking for GUI design features NetBeans 5.0 (hasn't been released yet, but you can download a beta version - release due in December) has a probably the best GUI designer. I would wait till the release version if I were your. It is also a solid IDE, but consumes a quite a bit of memory. Don't even consider this option unless you have 380MB+ RAM
www.netbeans.org
or
Eclipse
Very popular, uses less memory than NetBeans, but doesn't come with a GUI designer. Nice for editing code, but don't expect many fancy wizards.
www.eclipse.org. You can get away with about 256MB RAM.
If you intend to run Oracle 10g on the same system as these tools at the same time you better have a very impressive system, or will end up editor code in a text editor and compiling from the command line.

Similar Messages

  • Please suggest ~ 512GB SSD that definitely works with the MBP 15" mid'09

    Hello,
    I tried to upgrade the original Hitachi 5K500 HDD with the Plextor PX-512M5P SSD and I got all those freezes, lockups and beach-balling. The system became unusable over time.
    Please, suggest ~ 512 GB (modern) SSD that will definitely work with that buggy MCP79 SATA controller. As I understand, I need a drive that could be locked to SATA-I.
    Thanks.

    Fast way is to go to OWC, http://www.macsales.com and see which SSDs they offer for that model...those will have been tested and guaranteed to work.

  • Pretty new to Java can someone please help with an addObject() problem?

    Hi I'm pretty knew to programming and I have an assignment which I've been working on but I am stuck
    I have to create a 'space invaders' style game, and I've got some basics working. I wanted to add a boss enemy, which appears when all other enemies have been destroyed. It kind of works, only the program spawns a seemingly infinite amount of the boss which then creates a 'wipe' effect across the top of the screen.
    Here is my code:
    import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
    import java.util.List;
    public class Space extends World
    * Constructor for objects of class Space.
    public Space()
    // Create a new world with 200x250 cells with a cell size of 3x3 pixels.
    super(200, 250, 3);
    //add class with starstreaks
    addObject(new EmptyBox(),1,1);
    //add player character
    addObject(new Player(), 100, 228);
    //add 4 romulan enemies row 1
    for(int i=0; i<4; i++){
    addObject(new Romulan(), (25 + 50 * i), 15);
    //add 3 klingon enemies row 2
    for(int i=0; i<3; i++){
    addObject(new Klingon(), (50 + 50 * i), 40);
    //add 4 romulan enemies row 3
    for(int i=0; i<4; i++){
    addObject(new Romulan(), (25 + 50 * i), 65);
    //add 3 klingon enemies row 4
    for(int i=0; i<3; i++){
    addObject(new Klingon(), (50 + 50 * i), 90);
    //add 3 shields
    for(int i=0; i<3; i++){
    addObject(new Shield(), (30 + 70 * i), 180);
    *public void act(){*
    List<Enemy> enemies = getObjects(Enemy.class);
    *if(enemies.size()==0 ){*
    addObject(new Borg(), 100, 30 );
    I believe the part in bold is the problem, but I dont know why. Klingon and Romulan are subclasses of the Enemy class. The Borg class is it's own seperate class, but with the exact same functions as Enemy. I made it seperate as I figured it would keep respawning if it was a subclass of Enemy.
    Any ideas?

    Its ok, after more than an hour I've got it.
    I simply added private int bossValue = 0; at the beginning and then changed act to this:
    public void act(){
    List<Enemy> enemies = getObjects(Enemy.class);
    if(enemies.size()==0 && bossValue==0 ){
    //for(int i=0; i<1; i++){
    addObject(new Borg(), 100, 30 );
    bossValue =1;
    }

  • I AM NEW TO JAVA...PLEASE HELP ME

    Dear friends,
    I am very much interested in learning Java. But, I am Zero in Java. I don't know where to start, what to do..etc., I just downloaded Java Plug-In for Windows XP. Other than that I don't have anything.
    Please help me which is the best book to start learning Java. How to work? What to do? How to write simple programs in Java? Where can I download sample programs? How to execute them?
    All your replies would be greatly appreciated!!!
    Thanks,
    Rajan

    First of all, conggratulations for deciding to learn Java. I am myself a University student studying Java for the first time too.
    What you need to study for Java are: Java Development Kit (either version 1.3.x or the newer 1.4; either would work just fine), a text editor of your choosing (if your on Windows platform, you already have NotePad), Java Runtime Environment ( which is already available bundled with Java Development Kit when you download it), and most important of all, a will to study it.
    As I found out for myself, it can be daunting at first, but if you keep at it for a while, you'll get used to it. Don't worry to make mistakes here and there, we're here to learn, and if you do happen to make one, that's the best way to learn it.
    As for books, the ones I have at my arsenal for learning it are:
    Java Software Solutions
    Beginning Java 2 (WROX)
    The Java Tutorial, 3rd Edition
    Using Java 2, Standard Edition
    For the questions you posted on how it works, one of the books that I have, The Java Tutorial from Sun Microsystem, explains everything in detail not just 1 platform but for many.
    Another note, it's good if you can also look for an IDE (Integrated Development Environment) to work on your Java programs. If you don't want to buy one (I understand that most are very expensive), try getting Forte for Java Community Edition from Sun's download website.
    Good luck on studying and I hope what I have divulged to you would be of some help. Bye.

  • Im new to java can someone please help me with external method calls

    I have only been doing java for a couple of months using bluej, I really dont understand external method calls, this is for an assignment and i have managed the bulk of the code, ineed to make external calls to the other classes to return and input data.
    this is the code i have writen so far.
    class CD
    // The fields.
    public Artist performer;
    private String album;
    private String genre;
    private int numberOfTracks;
    private int yearReleased;
    *Please enter CD details, text entry requires quote marks "Greatest Hits"
    public CD (String album_Name){
    album = album_Name;
    numberOfTracks = 0;
    yearReleased = 0;
    performer = new Artist();
    /**blank constructor*/
    public CD ()
    {album = "";
                genre = "";
                numberOfTracks = 0;
                yearReleased = 0;
                performer = new Artist();}
    * accessor methods
    /** method to return album details to the output window*/
    public void print_albumDetails(){
    System.out.println("Album: " + album);
    System.out.println("Genre: " + genre);
    System.out.println("Number of Tracks: " + numberOfTracks);}
    /** accessor method to return the name of the album*/
    public String show_album(){
    return album;}
    /** accessor method to show artist details from artist class*/
    public void print_details(){
    performer.print_details();}
    * mutator methods
    /** mutator method to change album name please enter name with quotes*/
    public void change_album(String newAlbum){
    album = newAlbum;}
    /**mutator method for adding the album year and checking it correct
    * please enter a year between 1900 and 2005*/
    public void album_year (int year){
    if ((year < 1900) || (year > 2005))
    System.out.println("sorry the year is incorrect please enter a year between 1900 and 2005");
    else yearReleased = year;}
    /** mutator method to alter the number of tracks and check if the ammount is greater
    * than zero*/
    public void change_Number_Of_Tracks(int no_Of_Tracks){
    if (no_Of_Tracks > 0)
    numberOfTracks = no_Of_Tracks;
    else System.out.println("you have not entered a correct number");}
    /** mutator method to change the genre and check it has been entered correctly
    * Please enter 1 for Soul
    * 2 for Blues
    * 3 for Jazz*/
    public void change_Genre(int Change_Genre){
    if ((Change_Genre <= 0) || (Change_Genre > 3)){
    System.out.println("You have not entered the correct available genres");
    System.out.println("which are 1 for Soul,2 for Blues or 3 for Jazz");}
    else if (Change_Genre == 1)
    genre = "Soul";
    else if (Change_Genre == 2)
    genre = "Blues";
    else if (Change_Genre == 3)
    genre = "Jazz";
    to this i need to add an external call to the class Artist to be able to enter firstname and second name, I know that external calls use dot notation
    and the instance of Artist is called performer but i cant get the call to these methods in the Artist class to work
    Artist class
    /** mutator method to change or add artist first name, remember to add quotes*/
    public void cName(String name){
    firstname = name;}
    /** mutator method to change or add artist surname remember to add quotes*/
    public void csurName(String surname){
    lastname = surname;}
    can some please give me some help

    Also, if you can't get them to work, what is the error message you are getting?
    Baron Samedi

  • New to java can somebody please help me?

    I'm using jdk1.3.1_01
    and apache tomcat 4.0.
    the jdk works fine now thanks to much help from members on here.
    Now i have a problem with my apache tomcat server.
    When ever i try to start it i get the error which i've copied and pasted below.
    Can anyone please help me?
    It's extremely important that i get the apache tomcat server to work so i can practice servlet programming at home.
    Your assistance will be greatly appreciated.
    Following are the error messages:
    I'm using windows 2000 Pro; jdk1.3.1_01; and apache tomcat 4.0.
    But whenever i try to start apache tomcat i get a number of errors.
    I have copied these errors from the command windows and pasted them below because i don't know where to begin.Does anyone think i should reinstall apache tomcat 4.0
    Please take a look, here below are the error messages i'm getting.
    A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in :
    'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method.
    Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
    Catalina.start: LifecycleException: null.open: java.net.BindException: Address in use: bind
    LifecycleException: null.open: java.net.BindException: Address in use: bind
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1116)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java, Compiled Code)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java, Compiled Code)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)
    ----- Root Cause -----
    java.net.BindException: Address in use: bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:118)
    at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.java:946)
    at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1114)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java, Compiled Code)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java, Compiled Code)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
    at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
    at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
    at java.lang.reflect.Method.invoke(Native Method)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)

    In this particular case, you cannot start Tomcat because you have another web server or some other program already listening to the same port that Tomcat wants to use.
    (If you don't know what a port is in this context, write back and we will go into more detail.)
    I would guess that you may have Microsoft IIS running, particularly if you're on a corporate machine. You may have to look at the services running on your system and see if any of them are using the port - either check out start->control panel->administrative tools->services or do a "netstat -a" at the command prompt.
    Alternatively you may configure Tomcat to use a different port. The instructions that came with Tomcat will tell you what you will need to do - it's usually just changing one line in the httpd.conf file or whatever the latest Tomcat uses now (I'm not certain anymore).

  • Hi New to Java !!Please Help!!

    I have just started University and Java is part of the course.
    I have been told to download the kit from www.java.sun.com and this is fine.
    I do not understand how to install it!!!! I've read it over again but to no avail!! Do I have to change this autoexec.bak????
    I also dont seem to have the text pad!!!
    In Uni once we write it out we Hit ctrl+1, ctrl+2, and the message comes up!!!!
    Can anyone please help me out!!
    Thanks in advance

    I have just started University and Java is part of the
    course.well come to hell....: )
    >
    I have been told to download the kit from
    www.java.sun.com and this is fine.what kit you have downloaded? SE? EE? ME?
    I would guess J2SE
    >
    I do not understand how to install it!!!! I've read it
    over again but to no avail!! Do I have to change this
    autoexec.bak????it has nothing to do with autoexec.bat or config.sys
    try this address:
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/j2se/downloads.html
    I guess that you are using windows environment, so just choose
    win32 and follow the instruction, the installation is really easy,
    or just use the second address and download the kit
    >
    I also dont seem to have the text pad!!! I guess that's command prompt that you mean, go to start --> program --> accessories --> command prompt
    >
    In Uni once we write it out we Hit ctrl+1, ctrl+2, and
    the message comes up!!!!different computer different setting
    >
    Can anyone please help me out!!
    Thanks in advanceokay, any question please post or email me.
    [email protected]
    no abuse please, I'm just trying to help out.

  • New to Enterprise Portal..Please Suggest

    Hello.I am freshers in software industry and been assigned to Enterprise Portal.I never had any exposure to SAP either.Please give me some guidelines about the learning process of ep.And if possible some materials also.Thanx

    Hi Debason,
    Welcome to Enterprise Portal,
    Even though you dont have any exposure to SAP,Well no probelm still you can work very well on portal!!
    Well your learning will start from the getting familar to basics, such as creation of an iview,Connector systems etc.If you are going to work as portal developer then you should aslo have basic knowledge of NWDS (Netweaver Developer Studio).Portal Administration is also another aspect for learning. For material well, here it is
    <a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/HOME/Portal&">Wiki</a>
    This
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/a4/76bd3b57743b09e10000000a11402f/content.htm">LINK</a>
    Also
    https://www.sdn.sap.com/sdn/developerareas/ep.sdn?page=getStart_ep.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cb/f8751d8c6b254dac189f4029c76112/frameset.htm
    Some more links
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2746
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/241
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/387daf90-0201-0010-bb98-cb1a5545bf69
    For content development refer this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2845">LINK</a> also.
    Installing and configuring the preview edition of EP
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2851
    Enterprise Portal Implementation Forum
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/308
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2746
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/76bd3b57743b09e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/40e93bac3c5a6de10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/50/da644160087d47e10000000a1550b0/frameset.htm
    Hope this helps to you!!
    Regards,
    Ameya
    Message was edited by:
            Ameya Pimpalgaonkar

  • TS1398 Very weak WIFI on my new iPad MD511LL. Tried Apple suggestion, but they didn't work. Signal is variable from zero to two - never shows three 'bars' even on stronger wifi system. Could this unit be defective?

    Just bought it last week. Have synced it with my main computer. It gets WIFI most of the time, but the signal never goes above two bars (curves) even when I'm in a strong WIFI area. Rest of the time it varies between zero bars (no service) to two bars - slow, slow, slow.
    Already did the recommended shutdown and the WIFI on and off suggestions made by Apple. Already compared to other equipment, which receive a solid, strong three bars at all the same locations. Since this is the WIFI only model,quite alarmed at the problem. I need the WIFI to be able to pick up the signals better.
    Could this be an antenna problem?? Behaves this way even when not in any case.

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Need guidness, New to Java

    Hi
    i am 100% new to java, plz help, i have good concepts of programing but i dont know any thing about java. so plz tell me how to start, what should i install n from where to download,
    i will be so thank full to u
    plz email me at [email protected]
    regards
    imran

    Hi! I am also new to java. I was suggested in this forum two days back to start at Java Tutorial, and I am really thankful to the person who suggested me the tutorial. Its a good starting point.
    http://java.sun.com/docs/books/tutorial/
    Hope you find it useful too.

  • Cube Related Query.Please Suggest on this

    Hi All,
      I want to create a New Cube from 1 Cube and 2 DSO .For that how to create a transformation it will ask either to create from Cube or DSO but not both .
    Data Flow Diagram
                      New Cube
         Cube                            DSO         DSO
    Please Suggest on this
    Thanks & Regards
    Sameer Khan

    Hi,
    Create a New Cube, But u need to create Three different Transfermations nad three DTPs.
    execute three DTPs to load data.
    Assigning points in sdn is saying thanks.
    Regards,
    CK.

  • 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.

  • Very new to java please help

    i'm very new to java and i'm getting an error in my application. i took 4 applications that compiled and worked separatly and i tried to combine them into one application. i'm getting the error: unreported exception java.io.IOException; must be caught or declared to be thrown, in lines 73,78,83,88,120,146,149,152,155 in the and it points at the keyboard.readLine() but everything i've tried just gives me more errors. please help anything and everything will be greatly appreciated. here it is, sorry about format i dunno how to straighten it in here:
    // ^ ^
    //               (0)(0) A Happy Piggy Application
    // Problems: 2.6,2.8,2.9,2.12 (oo)
    // An application finds the total number of hours, minutes, & seconds, finds the distance
    // between two points, finds the volume and surface area of a sphere, and adds up the change
    // in a jar. First, the total hours, minutes, and seconds problem.
    import java.io.*;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    public class twoptsix
         static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
         static PrintWriter screen = new PrintWriter(System.out, true);
         public static void main (String[] args) throws IOException
              double hoursa, minutesa, secondsa;
              String hours;
              System.out.print ("Please enter a number of hours: ");
    hours = keyboard.readLine();
    hoursa = Double.parseDouble(hours); //asks programmer friendly user to enter hours
    String minutes;
    System.out.print ("Please enter a number of minutes: ");
    minutes=keyboard.readLine();
    minutesa = Double.parseDouble(minutes); //asks programmer friendly user to enter minutes
    String seconds;
    System.out.print ("Pretty please enter a number of seconds: ");
    seconds = keyboard.readLine();
    secondsa = Double.parseDouble(seconds); //asks programmer friendly user to enter seconds
    double allseconds;
    allseconds = (hoursa * 3600) + (minutesa * 60) + secondsa; //adds up all the seconds of the time entered
    System.out.println ("You have: " + hours + " hours..."); //displays hours
    System.out.println ("" + minutes + " minutes..."); //displays minutes
    System.out.println ("and " + seconds + " seconds..."); //displays seconds
              System.out.println ("to get whatever you need to done!"); //witty attempt at humor
    System.out.println ("The total amount of seconds is: " + allseconds + " seconds."); //displays total seconds
    // An application that finds the distance between two points when the points
    // are given by the user.
              double x1, x2, y1, y2, total, distance;
              String xa;
              System.out.print ("Please enter the 'x' coordinate of first point: ");
              xa = keyboard.readLine();
              x1 = Double.parseDouble(xa); //asks programmer friendly user to enter first x value
              String ya;
              System.out.print ("...also need the 'y' coordinate of first point: ");
              ya = keyboard.readLine();
              y1= Double.parseDouble(ya); //asks programmer friendly user to enter first y value
              String xb;
              System.out.print ("...and the 'x' coordinate of the second point: ");
              xb = keyboard.readLine();
              x2 = Double.parseDouble(xb); //asks programmer friendly user to enter second x value
              String yb;
              System.out.print ("...don't forget the 'y' coordinate of the second point: ");
              yb = keyboard.readLine();
              y2 = Double.parseDouble(yb); //asks programmer friendly user to enter second y value
              total = Math.pow(x2 - x1, 2.0) + Math.pow(y2 - y1, 2.0); //squares the differences of values
              distance = Math.sqrt(total); //finds the square root of the sum of the differences of the values
              System.out.print ("E=mc^2...oh and,");
              System.out.print ("the distance between point (" + xa +"," + ya +") and point("+
              xb + "," + yb + ") is : " + distance);
    // An application that takes the radius of a sphere and finds and prints
    // the spheres volume and surface area.
              double radius,volume,area;
              String rad;
              System.out.print("Please enter the radius of a sphere: ");
              rad = keyboard.readLine();
              radius = Double.parseDouble(rad); //asks programmer friendly user to enter the radius of a sphere
    DecimalFormat fmt = new DecimalFormat ("0.####");
              volume = ((4 * Math.PI * Math.pow(radius,3.0)) / 3) ;
              System.out.println (" The sphere has a volume of:" + fmt.format(volume)); //finds and displays volume
              area = ( 4 * Math.PI * Math.pow(radius, 2.0)) ;
              System.out.print (" The Surface Area of the sphere is: " + fmt.format(area)); //finds and displays surface area
    // An application that finds the total, in dollars and cents, of a number of quarters,
    // nickels, dimes, and pennies in your piggy bank.
              int pennies, nickels, dimes, quarters;
              double money1;
              screen.println("Empty your piggy bank and count the change, how many quarters ya have?: ");
              int q = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of quarters
              screen.println("How many dimes?: ");
              int d = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of dimes
              screen.println("How many nickels?: ");
              int n = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of nickels
              screen.println("How many pennies?: ");
              int p = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of pennies
              NumberFormat money = NumberFormat.getCurrencyInstance();
              money1 = (.25 * q) + (.1 * d) + (.05 * n) + (.01 * p);
              screen.println("You're rich! Total, you've got: " + money.format(money1));//finds and displays total money

    Ok here is the working code as one long function:
    // ^ ^
    // (0)(0) A Happy Piggy Application
    // Problems: 2.6,2.8,2.9,2.12 (oo)
    // An application finds the total number of hours, minutes, & seconds, finds the distance
    // between two points, finds the volume and surface area of a sphere, and adds up the change
    // in a jar. First, the total hours, minutes, and seconds problem.
    import java.io.*;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    public class twoptsix
        static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
        static PrintWriter screen = new PrintWriter(System.out, true);
        public static void main (String[] args) throws IOException
    double hoursa, minutesa, secondsa;
    String hours;
    System.out.print ("Please enter a number of hours: ");
    hours = keyboard.readLine();
    hoursa = Double.parseDouble(hours); //asks programmer friendly user to enter hours
    String minutes;
    System.out.print ("Please enter a number of minutes: ");
    minutes=keyboard.readLine();
    minutesa = Double.parseDouble(minutes); //asks programmer friendly user to enter minutes
    String seconds;
    System.out.print ("Pretty please enter a number of seconds: ");
    seconds = keyboard.readLine();
    secondsa = Double.parseDouble(seconds); //asks programmer friendly user to enter seconds
    double allseconds;
    allseconds = (hoursa * 3600) + (minutesa * 60) + secondsa; //adds up all the seconds of the time entered
    System.out.println ("You have: " + hours + " hours..."); //displays hours
    System.out.println ("" + minutes + " minutes..."); //displays minutes
    System.out.println ("and " + seconds + " seconds..."); //displays seconds
    System.out.println ("to get whatever you need to done!"); //witty attempt at humor
    System.out.println ("The total amount of seconds is: " + allseconds + " seconds."); //displays total seconds
    // }  <----- MAIN FUNCTION USED TO END HERE!!!
    //but we want to keep going so remove the bracket!
    // An application that finds the distance between two points when the points
    // are given by the user.
    // {  <-- other function used to start here, but now it continues
    double x1, x2, y1, y2, total, distance;
    String xa;
    System.out.print ("Please enter the 'x' coordinate of first point: ");
    xa = keyboard.readLine();
    x1 = Double.parseDouble(xa); //asks programmer friendly user to enter first x value
    String ya;
    System.out.print ("...also need the 'y' coordinate of first point: ");
    ya = keyboard.readLine();
    y1= Double.parseDouble(ya); //asks programmer friendly user to enter first y value
    String xb;
    System.out.print ("...and the 'x' coordinate of the second point: ");
    xb = keyboard.readLine();
    x2 = Double.parseDouble(xb); //asks programmer friendly user to enter second x value
    String yb;
    System.out.print ("...don't forget the 'y' coordinate of the second point: ");
    yb = keyboard.readLine();
    y2 = Double.parseDouble(yb); //asks programmer friendly user to enter second y value
    total = Math.pow(x2 - x1, 2.0) + Math.pow(y2 - y1, 2.0); //squares the differences of values
    distance = Math.sqrt(total); //finds the square root of the sum of the differences of the values
    System.out.print ("E=mc^2...oh and,");
    System.out.print ("the distance between point (" + xa +"," + ya +") and point("+
         xb + "," + yb + ") is : " + distance);
    //second function used to end here...
    //} <--- COMMENT OUT BRACKET SO WE CONTINUE
    // An application that takes the radius of a sphere and finds and prints
    // the spheres volume and surface area.
    //{ <--- ANOTHER ONE TO COMMENT OUT
    double radius,volume,area;
    String rad;
    System.out.print("Please enter the radius of a sphere: ");
    rad = keyboard.readLine();
    radius = Double.parseDouble(rad); //asks programmer friendly user to enter the radius of a sphere
    DecimalFormat fmt = new DecimalFormat ("0.####");
    volume = ((4 * Math.PI * Math.pow(radius,3.0)) / 3) ;
    System.out.println (" The sphere has a volume of:" + fmt.format(volume)); //finds and displays volume
    area = ( 4 * Math.PI * Math.pow(radius, 2.0)) ;
    System.out.print (" The Surface Area of the sphere is: " + fmt.format(area)); //finds and displays surface area
    // } <----- COMMENTED OUT FOR THE SAME REASON
    // An application that finds the total, in dollars and cents, of a number of quarters,
    // nickels, dimes, and pennies in your piggy bank.
    //{ <----AND ANOTHER
    int pennies, nickels, dimes, quarters;
    double money1;
    screen.println("Empty your piggy bank and count the change, how many quarters ya have?: ");
    int q = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of quarters
    screen.println("How many dimes?: ");
    int d = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of dimes
    screen.println("How many nickels?: ");
    int n = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of nickels
    screen.println("How many pennies?: ");
    int p = (new Integer(keyboard.readLine())).intValue();//asks programmer friendly user to enter a number of pennies
    NumberFormat money = NumberFormat.getCurrencyInstance();
    money1 = (.25 * q) + (.1 * d) + (.05 * n) + (.01 * p);
    screen.println("You're rich! Total, you've got: " + money.format(money1));//finds and displays total money
    }P.S. To make the code formatted better put [ code ] before and [ /code ] after. It's not perfect, but a little better...

  • Hi, I am new to apple world. My i pad is showing me a message "cannot connect to App store". It is however connected to wifi. please assist??

    Hi, I am new to apple world. My i pad is showing me a message "cannot connect to App store". It is however connected to wifi. please assist??

    1. Make sure iPad is using the latest software
    2. Settings>General>Date and Time>Set Automatically>On
    3. Make sure Time Zone is correct
    4. Reset iPad. Hold the Sleep and Home button down until you see the Apple Logo.

  • Totally New in Java - Please help!!

    Hi Dear all,
    l am totally new in Java, and l facing one problem,and really hope can get some help from yours,please!
    l need to write this program:
    The program should do the following:
    1. Input two fields: action (action: add / delete), and account number (any
    digit or character)
    2. if the action is "add" then the program adds one text line to a text
    file.
    "New account is <account number>"
    3. create the text file if it is not already exist (in c:\)
    4. When program runs again with new input values, a new line will be
    appended to the same file.
    5. if the action is "delete" then the program finds the record and removes
    the text line from the file.
    My problem is :
    l just know that l need to create the user interface first,but l don't know how to go on??
    Would you please show me some step how to solve these problem?
    Many many thanks!!
    BaoBao

    I don't know about Swing. I never use it.
    The stuff to create and manipulate files is in the java.io package.
    You'll probably want to use java.io.FileReader and java.io.FileWriter.
    Note that FileWriter has a constructor that lets you append and not overwrite.
    I'll start you off with a test.
    public class AccountListAddTest() {
      public static void main(String[] argv) {
        AccountList accts = new AccountList();
        accts.add("abcdefg12345"); // arg is a hypothetical account number
    }Write an AccountList class that'll work if you compile and run this test. After you run this test for the first time, the file should contain the string
    New account is abcdefg12345.
    This test assumes that the filename is hardcoded into the AccountList class. To keep it simple, make the add method create a new appending FileWriter each time, write, then close the writer.

Maybe you are looking for

  • Can we place the taskflow in a jsff fragment?

    Hi All.can we place the taskflow in a jsff fragment?if i place so i am getting the following error.can some one help me out? <UIXRegion><getRegionModel> java.lang.IllegalStateException: The expression "#{bindings.openManuscript1.regionModel}" (that w

  • How do you get new voicemails first?

    @How can I bypass the old voicemails and get the new ones first.  I could do that on my office smartphones but my personal one starts with the old messages first.  Verizon techs say that is the way the system is set up.  I do not think that is the ca

  • Switching on/off WiFi by main menu icon

    I had configured my Snow Leopart to ask for password confirmation when switching on/off the Airport. Whenever triggered the password popup came up and the user was able to immediately enter the password, because the dialog automatically received keyb

  • BUSINESS OBJECT X1 ?

    Hi. Good Morning. Happy New Year. Are SAP Exchange Infrastructure and BUSINESS OBJECT X1 one and the same ? Can we design and develop AdHoc queries using  XI ? Please clarify my doubts. Thank you..Gowtham

  • Help: Macbook won't reboot, can't reinstall OS

    My MacBook hung in Quark Xpress 7.01; could't force quit, had to shut down by holding down power key. Since when MacBook has failed to revive. It won't restart on its own. Installer Disk 1 Repair Utility fails to find the hard disk to repair; it cann