Has anyone got any advice on this problem?

I'm just getting to grips with Java and I'm having trouble getting some code to work. I want to find out why I'm getting error messages with the following code:
public class CraftItem {
private String itemCode;
private double price;
public CraftItem(String iCode, double iPrice) {
itemCode = iCode;
price = iPrice;
public void prCraftItem(){
System.out.println("Item " + itemCode);
I'm getting:
"CraftItem.java": Error #: 206 : malformed expression at line 10, column 5 with the first bold text
"CraftItem.java": Error #: 204 : illegal start of expression at line 12, column 3 with the second bold text
I'm using a Test.java to test the program:
public class Test {
public Test() {
public static void main(String[] args) {
CraftItem nails = new CraftItem("123456",1.5);
nails.prCraftItem();
It's probably something childishly simple to Java experts but any advice for me as to where I'm going wrong with this would be much appreciated!
Thanks - Nic

public CraftItem(String iCode, double iPrice)
     public void prCraftItem(){}
}Nested method?

Similar Messages

  • My apps will not download to ipad2 this is something that has just recently happened.Have switched the pad on and off holding buttons down but it makes no difference.Has anyone got the solution to this problem Thank you.

    My apps will not download to iPad 2 This is something that has just recently happened. Have tried re-booting but that makes no difference .
    Has anyone got the answer to this problem please or do I need to take it into an Apple store Thanking you.

    If all of that stuff checks out - and iTunes is telling you that the apps have been downloaded to the iPad - try this.
    Connect your iPad to your computer and launch iTunes. Right click on your iPad name on the left side of iTunes under devices and select Transfer Purchases from the pop up menu. Then sync with iTunes again. Don't eject the iPad yet. If you still don't see the apps on the iPad - click on the Apps Tab in the iTunes window on the right and see if they show up on any of the iPad screens. If they do - make sure that all of the apps are selected (checked) to sync - (checkmarks in the boxes next to the app names) - check to make sure that the Sync Apps heading is checked and as well and then sync again. You may have to click on Apply in the lower right corner of iTunes if the apps were not selected to sync.

  • HT1386 hi - i have recently upgraded to an iphone and find that when i open my MS Outlook on my computer, the emails that were on the iphone get wiped out. Has anyone got a solution to this problem? I'm sure it's very simple when you know the answer! Than

    hi - i have recently upgraded to an iphone and find that when i open my MS Outlook on my computer, the emails that were on the iphone get wiped out. Has anyone got a solution to this problem? I'm sure it's very simple when you know the answer! Thanks.

    Pay no attention to iinami, the amount of replies to people saying their handsets must have been jailbroken everytime iTunes throws out an error is tremendous. (Clearly you don't need to have any real knowledge to get to level 3 on these forums, let's hope apple's geniuses know a lot more than some of their customers.)
    http://support.apple.com/kb/TS3694
    Solution below.
    Error 9
    This error occurs when the device unexpectedly loses its USB connection with iTunes. This can occur if the device is manually disconnected during the restore process. This issue can be resolved by performing USB troubleshooting, using a different USB dock-connector cable, trying another USB port, restoring on another computer, or by eliminating conflicts from third-party security software.

  • I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it sti

    Hi
    I'm trying to update my apps using the creative cloud desktop app. I can't see any apps in the app tab, the wheel just spins round and round and nothing happens. Has anyone got any ideas? I've tried uninstalling the desktop app and reinstalling but it still has the same problem.
    Cheers
    Rachel

    Hi Rachel,
    You can follow the article: App doesn't open | Progress wheel spins continually to get your issue fixed.
    Let us know if the issue still persists or not.
    Regards,
    Ratandeep Arora

  • I just noticed that when I talk on skype, my friends can not hear me as clear. I went to sound setting on the mac and noticed that my voice was getting picked up to good regardless of chaning the setting. Has anyone got any idea??

    I just noticed that when I talk on skype, my friends can not hear me as clear. I went to sound setting on the mac and noticed that my voice was getting picked up to good regardless of chaning the setting. Has anyone got any idea??

    Basic troubleshooting from the User's Guide is reset, restart, restore.  Has any of this been tried?
    It is possible that dropping the device has caused the issue.... regardless, it's unlikely Apple would do a warranty exchange since there is obvious user damage.
    If basic troubleshooting does not resolve the issue, take it to an Apple store for evaluation... if determined to be a hardware issue and you ask nicely, they may be able to assist you, but they may also only provide the option of an Out of Warranty replacement.

  • TS1538 I cannot get Itunes to recognize my Iphone 4s, or Ipad2 after installing IOS7???  Says must install Itunes 11.1.  0So I did and still no luck.  Anyone got any advice???

    I cannot get Itunes to recognize my Iphone4s, or Ipad 2 after installing IOS7?  Says must install Itunes 11.1 So I did that and still no luck.  Anyone got any advice???

    Version 11.1.5.5 of iTunes was just released today. If you update to that, does that help with the recognition troubles?
    http://www.apple.com/itunes/download/

  • Ios 8 keeps crashing on my iPad 2. Has anyone got a solution to this. My iPad 2 was great before upgrading.

    ios 8 keeps crashing on my iPad 2. Has anyone got a solution to this. My iPad 2 was great before upgrading. It's so bad that now I want to throw my iPad out so if anyone has tips to enhance my iPads performance please share.

    I would read up on restoring your device
    Restore
    http://support.apple.com/kb/HT1414
    Especially if you installed the update over the air,  a restore, which will use a computer to install the iOS again sometimes helps. There seems to be better results from doing it via iTunes than over the air

  • I continue to receive "failed to mount" when trying to install .dmg files or updates.  Has anyone found an answer to this problem?  I am operating on Mac OS X 10.4.11

    I continue to receive "failed to mount" when trying to install .dmg files or updates.  Has anyone found an answer to this problem?  I am operating on Mac OS X 10.4.11

    10.4.11 was only available as a PowerPC updater application (both as a Combo and as a Delta) to Macs with 10.4 or later that were PowerPC. If you don't have 10.4 installed on your Mac, see this tip:
    https://discussions.apple.com/docs/DOC-2541

  • Has anyone got any idea as to when the iPhone 4S will come to India?

    Has anyone got any idea as to when the iPhone 4S will come to India?

    Anyone here knows as much as you do and has access to the same info as you. Check Apple's India website for announcements. 

  • I recently bought a Samsung Galaxy s5 and cannot receive iMessages from iphones, I have deleted my apple id, turned off imessage, turned off spam messages on my android device, wasted 35 minutes on the phone to Apple's 'Support' has anyone got any tips?

    I recently bought a Samsung Galaxy s5 and cannot receive iMessages from iphones, I have deleted my apple id, turned off imessage, turned off spam messages on my android device, wasted 35 minutes on the phone to Apple's 'Support' has anyone got any tips?

    Hi,
    Do you mean you are not getting SMS text messages now ?
    If so start here
    Follow the Account management options until you are offered and email contact.
    Explain the issue via email as only someone in Support can now remove your iPhone Number from iMessages if it has not "de-registered" itself correctly.
    8:28 pm      Wednesday; May 7, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Hello All, I have a Model - MacBook Pro Laptop and the screen recently turned grey giving me zero visibility or access to the computer. Has anyone else seen or had this problem? Is it fixable or should I get a new unit?

    Hello all,
    I have a Model - MacBook Pro Laptop and the screen recently turned the colour grey, giving me no visibility or access to the unit.
    Has anyone had or seen this problem before? Can it be fixed? I had a repair guy from my local Mac Store take a look at it - he said I needed a whole new screen and top of the computer, but this didn't fix the problem. I took the unit home unrepaired, and a week later it was all of a sudden working fine.
    What is happening with my Laptop? Once this happens (grey screen) does it mean that it's going to become a chronic problem?
    Please advise....Thanks

    It's kind of difficult to diagnosis your problem without a visual clue, because there is a (mostly) software based "gray screen" at boot issue.
    But if you got the screen replaced, took it home and now it works, why the repair shop didn't get it working before it left the store is beyond me.
    Unless the repair shop is a authorized apple reseller/repair, I wouldn't have taken it to them, and of you did, they should have fixed the issue right away.

  • Has anyone got any examples of successfully using this crossword in CP6

    This is the link to the crossword....if so, is it online for viewing or can you provide a link to it?
    On that note, is there a easier way to create these yet...?
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=3271 022
    Cheers
    Rossco

    It is good to hear that is getting Apple feedback from other sides regarding that network problem. I always thought that this just matters for bigger studios with multiple rooms and network installations and therefore not that a high priority for Apple. It never occurred to me that in a networked school environment that is a big issue and last time I checked Apple pretended to to care about the educational market.
    If you really need the network setup to work with Logic and can't wait for Apple to fix it, try to mount the network volumes via the smb protocol instead of the afp protocol. I used it for a while under Logic 7 and it worked, haven't tried it under L8. However keep in mind that are some drawbacks:
    Besides minor user interface limitations (color, icons, etc), the main problem is some boneheaded setup in Logic. Get that:
    Logic saves the path to any related media file, which is ok, but it saves also the network protocol it uses! If you logged on to a network volume over smb and use an audio file, Logic will save the complete path, something like "smb://MediaVolume/audio/MyGroove.aif". Netx time you mount the MediaVolume drive via afp and open your Logic Project, it won't find that file, or automount that volume again as an smb volume. So now you have the same network volume mounted twice, via afp and smb.
    Now you can see why I backed away from that solution.

  • Has anyone in the community faced this problem??

    While watching a video on my iphone 4s with 3g connection (sitting in my car with the engine shut off)
    for about 30/40 minutes (and after disconnecting the cellular data/3g) when i tried to start the car I found
    to my horror that my CAR BATTERY has completely drained off.with help of a friend I managed to recharge the battery and
    rode back home.
    Since I was very perplexed by this I decided to experiment.Yesterday I watched another video the same way
    and believe me or not the CAR BATTERY had drained off.
    Normally it starts fine the next day morning after overnight garraging, and also after I park it for nearly 8/10 hrs.
    during working days.
    Any light shed on the matter will be greatefuly acknowledged.
    tks and good day,
    Venkat

    iPhone battery is rated at about 1500mAhr. Car battery at about > 40 AHr. So in half an hour the phone has drawn about 0.75 AHr.  Hardly enough to flattena car battery so your claim is impossible

  • Refurbished from canon,with 90 day limited warrenty.Has anyone purchased.Any thoughts on this?

    Hello..Just wondering if anyone here has bought refurbished product,and your input on the subject. There is some good holiday prices on some of there cameras,but refurbished..From Canon directly

    Like a previous poster said, other than the white box, there's not much different.  If the full-retail version of a lens comes with a hood and case, so does the refurbished version of the same lens when you buy from the Canon store.  Same goes with the lens hood.  
    Those holiday prices are pretty good.  The discounts happen off and on through out the year.  I think they come in 15%-25% varieties.  But the inventory doesn't last very long.  If you follow blogs, some of them will relay the announcement of a discount's start.  Of the blogs I follow, http://www.the-digital-picture.com/News/ normally makes the first announcement.  You can add it to your RSS reader with http://www.the-digital-picture.com/News-RSS.aspx.
    You might find this thread interesting: http://forums.usa.canon.com/t5/Lenses/Refurbished-quot-L-quot-Are-they-worth-it/m-p/4867#U4867

  • Has anyone got any info on how to remove opensoftware updater?  it has locked up my safari screen

    I accidently clicked on something when trying to play a game.  It stuck this box on my safari screen that says Opensoftwareupdater.com and tells me to click ok to update my software, which I suspect will download a virus.  I am not able to get rid of it.  Anyone know anything about it?  The apple support rep has never seen it and sent me here.
    Thanks

    Force quit Safari.
    Press Command + Option + Esc
    If that doesn't help, doubtful it's a virus but it could be malware.
    The Safe Mac » Adware Removal Guide

Maybe you are looking for