Volume level method

i can't figure out what's wrong with my volumeLevel() method in this code, can anyone please show me what's wrong with it? thanks!
class volumes
     int currentVolume;
     void volumeUp()
          if(currentVolume == 5)
          System.out.println("Volume is at 5, the maximum level");
          else
          currentVolume = currentVolume +1;
          volumeLevel();
     void volumeDown()
          if (currentVolume == 1)
          System.out.println("Volume is at 1, the lowest level");
          else
          currentVolume = currentVolume -1;
          volumeLevel();
     void volumeLevel()
          if(currentVolume == 1)
          System.out.println("Volume is at level one");
          else if(currentVolume == 2)
          System.out.println("Volume is at level two");
          else if(currentVolume == 3)
          System.out.println("Volume is at level three");
          else if(currentVolume == 4)
          System.out.println("Volume is at level four");
          else if(currentVolume == 5)
          System.out.println("Volume is at level five");
}73: illegal start of expression
     void volumeLevel()
^
118: ';' expected
^
120: '}' expected
^
:34: cannot resolve symbol
symbol : method volumeLevel ()
          volumeLevel();
^
:68: cannot resolve symbol
symbol : method volumeLevel ()
          volumeLevel();
^
5 errors

thanks george
why it say 5 errors when i had only really made one??common occurrence, welcome to java. in a nutshell, the compiler isn't smart enough to work out that that's what you'd done, it just reports errors as it encounters them. the upshot of missing that bracket was that it got the order of everything after your mistake all mixed up, and found several things in places it didn't expect. a sort-of domino effect. without picking through it line by line it's hard to tell exactly what, and not worth doing anyway. suffice to say that learning to read compiler output is probably the best way to improve your productivity. 5 errors from one tiny mistake isn't too bad, I've had hundreds before

Similar Messages

  • ITunes volume level vs. OS X volume level

    Hello,
    Is there any method to "lock" the iTunes volume level to OS X? Ie. i don't want two options to adjust volume level (inside iTunes and in OS X on my MacBook Pro). I just want one. The thing is that i want to be able to adjust the volume level using the Remote app on my iphone. But i always leave the volume bar on max inside iTunes, so i'm only able to decrease the volume and not increase it.
    Let me explain this with an example:
    iTunes is playing some song.
    iTunes volume is a 100%
    OS X volume is at 50%
    I'm not next to my computer and i wan't to increase the volume of the music.
    I pull out my iphone from my pocket, launch Remote and the volume bar is at 100% - hence i'm only able to decrease the volume.
    Until now i would turn down the volume in itunes to lets say 50% and the volume in OS X to 100%. That way i would be able to both de- and increase the volume from the Remote. But this means that all other sound on my MacBook is at 100% and that is sometimes too loud.
    So what i would like some patch or app that adjust the volume in itunes if i manually adjust the OS X volume, to match the same percentage. And vice versa; if i adjust the volume in itunes (inside itunes on my mac or through the Remote app) it should adjust the it should automatically adjust it to the corresponding percentage in OS X.
    Thanks.

    are you using Sound Check?

  • HP 4120 Lync Phone Edition - Ringer Volume Level Can Not be controlled when a second call comes in for a workflow

    Here is the scenario we are experiencing with our HP 4120 Lync phones running the latest available firmware (4.0.7577.4455)
    1) A User has an HP 4120 phone and is a member of a workflow/response group which is setup with attendant routing method.
    2) The ringer volume is set to the minimum level by the user
    3) When a single call comes in to this user, the ringer volume level works as expected
    4) When two calls come in at the same time to this users phone, the ringer volume set by the user is ignored and the ringer plays at Maximum volume.
    This is causing disruptions to our office environment as we are unable to reliably control the volume levels of the ringers.
    There does not appear to be anything more in the settings/menus of the phones themselves.  I am thinking this may be an issue with the firmware, but if anyone else has any suggestions, they would be appreciated.
    Thanks!!

    Hi,
    Did the issue also happen before update to the latest firmware?
    Did the issue only happen for Response Group call or also happen for basic calls?
    If the issue only happen after updating to the latest firmware, it can be the issue of the firmware.
    As there is call delay for Lync IP Phone to be a agent of the Response Group. So you can try to use Lync desktop to instead for better performance.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How can a consistent volume level be set for all the songs in an iTunes library?

    The volume of the songs in my iTunes library varies significantly when played on my iPod.  Is there any way of setting a consistent/equal volume for the songs in my library so that I don't have to change the volume level when listening to my iPod?

    I have used the $30 iVolume utility to equalize my iTunes song's volume for several years and it works well. I just wish it worked for music videos.  iVolume is available on the Mac  App Store, or you can try before you buy at the developer's site: http://www.mani.de/en/ivolume/index.html

  • Using compressor DVD Studio Pro 4 will only accept ac3 format in the burn process. ac3 makes a nnsense of the good sound delivered, 30% reduction in volume, auto volume levelling giving unwanted volume variations. Used to be able to burn using AIFF/WAVE,

    AS Above. Edited in FCPX. Excellent sound file. Using Compressor 4 to DVD Studio 4. Wanting AIFF or WAVE sound for acurate sound.
    Previously DVD Studio 4 has accepted AIFF etc and delivered sound as reuired. Now, during the burn process everything other than ac3 is declined as 'video bit rate too high', but will burn if the AIFF format is replaced with ac3 (which I presume meanss the 'video bit rate too high' is referring to the sound file)
    The issue with ac3 format is the huge reduction in original volume and worse, the 'auto volume levelling' that makes a nonsense of the original soundtrack - with simply aweful unwanted variations in volume Throughout the  the dvd.
    I have tried everything I can think of to get around this. The 'volume gain' in compressor doesn't make any difference. Exporting just AIFF and the Video to DVD 4 doesn't make any difference, it always declines anything but the aweful sound ac3 delivers.
    I have customers awaiting a musci DVD, not with thei quality I can't.
    Cheers
    Phil

    The total video bit rate is determined by audio & video. Depending on what rate your video file was encoded at will determine how much room is left for audio. PCM(aiff/wav) audio requires a bigger piece of the pie. Video bit rate too high means your overall(video+audio) rate is going above 9Mbps which the format won't allow. The only way to use aiff would be to lower your video file's data rate. The length of your program is also a factor in all of this.
    I had some problems in the past with using aiff instead ac3. Although there shouldn't be any issue I experienced playback issues on some players that couldn't be explained but were cleared up by ac3.  I have been using the same specs as Dave's suggestion for almost nine years and have not had any issues with mix, quality, or levels.

  • Can I have multiple volume levels in one track?

    I have a track composed of audio from a cassette recorder of a now deceased relative's voice.
    Since the cassette was turned on and off during recording, the recordings are at different volumes.
    I have been able to import the cassette into a GarageBand project, and delete dead space, but now I find that the volume is not consistent.
    Any way to remedy that? I am wondering if I need to chop it up and make more than one track, and adjust the volume on each track? Will this work as long as the tracks don't overlap?
    And then do I send the finished product to iTunes in order to be able to use it in an iMovie?
    Or can I drag it right from GarageBand to iMovie?
    Many thanks, I'm a very new GarageBand user.

    JGolomb wrote:
    Can I have multiple volume levels in one track?.
    search GB's help for "curve"
    And then do I send the finished product to iTunes in order to be able to use it in an iMovie?
    "Share" it to disc
    can I drag it right from GarageBand to iMovie?
    no

  • Sometimes my iphone 5S produces low sound even on full volume level. Then i do restart it. But i am not sure where exactly the problem is? Need help.

    Sometimes my iphone 5S produces low sound even on full volume level. Then i do restart it. But i am not sure where exactly the problem is? Need help.

    Hi saiyed adil, 
    Thank you for contributing to the Apple Support Communities. 
    It appears that your iPhone 5s sometimes produces low sound, but a restart corrects it. 
    It can take some time to isolate and resolve intermittent issues like this one, and I'd recommend going through the steps in this guide the next time it occurs:
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    All the best,
    Jeremy 

  • Is there any "mechanical" helper to get my volume levels the same?

    I create playlists from ratings,(and comments),- and albums have different volume levels. As I always use my ipod to go to sleep, it is very destructive, to not be able to hear my music one minute, and then have it much too loud the next.
    Is there ANYTHING, free or chargeable, physical or software, that can help me get my itunes library to all the same volume level. My problem is agrivated by the fact that I do have some shared downloads, and also someone put my vynils onto cd for me, but at a lower volume.
    I might add, that I'm still a learner on the computer. I have been told to change the soundcheck -playback -preferences -itunes. I have tried it, ticked and unticked - it doesn't make any difference.
    I'd be very gratefull for some advice. Please HELP, this has been going on for ages. Thank you, in anticipation.

    I'm SO very grateful for your help! Have downloaded it, and have started to use it, but havn't listened to results yet.(just about to) THANKYOU SO MUCH.
    Thankyou so much again, this could be the end of a long (negative) era!
    A bit later: have listened to a little, seems a huge amount better. will update when used properley.
    I'm anticipating some being way out. Though it says it can overcome old changed volume levels, is it best in your opinion, to put them back to original setting?
    Many Best Wishes Vonnie

  • 1020 There is no lock for ringer volume level, but...

    Earlier today I posted in this Community regarding the Subject issue. Received good reply and marked it as a Solution. Had additional thoughts so I'm doing this new Post. Same Subject as before. I had asked if it's possible to LOCK the ring volume, at 10 for example, it's loudest, so I can hear it ring no matter what. I've been unpleasently surprised several times when my ringer rings BUT the volume is much much lower, way too low (2 or 3 maybe), way lower from where I had set it, up at (10). So then, I immediately adjust the volume back to 10, where I want it to stay, always. The volume up and down rocker button works fine. Problem is, the unexpexted, surprising and unwanted way very low ringer volume that causes me to MISS SOME CALLS. I have four kids. As a parent, missing calls can be a SERIOUS matter. If I could LOCK my ringer volume at 10 then I'll be happier. For me, thr parent, this tricky too low ringer volume problem is more than an annoying tech glich. What causes this problem, you may ask? The volume goes down without wanting it to do that because that while the phone is unlocked and in any kind of use or even while it is in screen lock mode, the very handling of the phone will sometimes unintendedly, unknowingly, without noticing it, press the down volume part of the volume rocker buttom. After all, the down volume part of the rocker button is the located at the lower end of that rocker and is closer to the center of the phone and close to the power button. That's right where anybody normally holds and works the phone, right there. AND worse yet, it takes only a little bit of pressure to accidently push the down volume rocker button. No wonder the down volume button unwillingly gets pressed alot. Also, unwanted down volume change, by pressing of the volume button, can happen in many ways such as in a pocket, carrying it in your hand, passing the phone around, lots of ways. This unwanted down volume change can and does happen on the 1020 while calling, texting, using apps and even during the screen lock mode, and that is with or without the pass code feature enabled. Only time this can't happen is when the phone is completely off and dark. I've searched the posts and don't find anyone else saying this. That doesn't mean it's not a real problem, like for us parents and others. But I know that what I say is correct, to my knowledge, because today an MS WP Community Moderator and also a Lumina Community contributor agreed with what I'm experiencing. This problem has always happened with my 1020 and my previous 920 always did exactly the same type of low volume TRICK. No updates are causing this problem along the way. It's just now that I got fed up enough to confirm within the Communities that there is NO WAY TO LOCK THE RINGER VOLUME on the 1020. I'm ranting about it to you fellow Lumina users. If you experience this, if it bugs you, if you agree that it's more than a mere tech glich nuisance, that it's causing missed calls for family and business, then please post in on this Lumina Community and demand a fix for it. I'm not a phone software expert but I'll bet that a minor software tweek followed by an update, is easily possible. This fix SHOULD be good for existing Lumina models, not just for future ones. I'm gonna work this. It can happen more surely and quickly if those Lumina users who share my concern will post about it. This post is not a critique nor does it infer defects in software or phones. I just want to peel a layer off this onion.
    WJC

    SonOfTheSouth wrote:
    Also, unwanted down volume change, by pressing of the volume button, can happen in many ways such as in a pocket, carrying it in your hand, passing the phone around, lots of ways. 
    As far as the phone is locked, the volume key will not function .. so this should not affect the volume level.
    SonOfTheSouth wrote:
     I'm ranting about it to you fellow Lumina users. If you experience this, if it bugs you, if you agree that it's more than a mere tech glich nuisance, that it's causing missed calls for family and business, then please post in on this Lumina Community and demand a fix for it.
    This being a User-to-User forum, what you suggest may not have the indended effect. But, you may add your vote HERE to the most appropriate 'feature request' ..

  • When I set all the tracks in the latest Garageband to the same volume levels and save, when I open the file again they've changed back to a previous setting?

    I'm trying to mix a recording in the latest 2014 version of Garageband, but when I set all the tracks in the latest Garageband to the same volume levels and save, when I open the file again they've changed back to a previous setting? Does anyone know why it changes even after saving the file?
    Below is my iMac settings.

    Do you have a back up?
    If not you're into using file recovery software like  File Salvage - you can download a free trial and it will scan the disk for you and tell you with might be recoverable. Actual recovery will require that you purchase the app. There may be many files with the same or similar names. Always recover the largest file size.
    There are other such apps. Search on Macupdate or the App Store

  • I locked my volume level, and forgot the code to unlock it, so how can i get my volume back to normal without a code??

    About four years ago I set the volume lock on my ipod to half way up. To do that, you enter a four number code. I decided to change the code one day, and then ever since then i can not remember the code. I would like to remove my volume lock from half way, so that i can turn it up to max volume, but to do this it is asking for the old four number code, which i don't remember! So how can i take this volume lock off without knowing the code??? I tried to reset all settings, but that did not remove the volume lock. Please help me figure out how to achieve full volume level!
    Thanks.

    See here: Restoring iPod to factory settings
    B-rock

  • Macbook Pro 15" volume level changes by itself

    Hi all!
    About a month ago I have upgraded my rock-solid Macbook Pro 15" (mid 2012) from Mountain Lion to Mavericks. All seemed fine (with the exception of some known annoyances with WIFI) until last week when all of a sudden the volume level started to change by itself. It started going up and down, turning mute and turning on again and so on, just like an invisible hand or a remote access have taken control of my machine (it wouldn't even let me change the the volume using the volume buttons while this weirdness is happening). This has never happened before. To make things worse, I have then upgraded to Yosemite and all seemed fine but then the weird volume changes appeared again and I now am stuck with no straight forward way of reverting all the way back to the original Lion (which worked perfectly since Mac purchase back in 2012).
    Can anyone help?
    I have googled for similar issues and have seen  some answers (mostly not that relevant) including a thread on this forum suggesting to reset the SMC. I have tried that using the suggested key-combination press, but it did not seam to have solved the problem, as the volime changes continue when I least expect it.
    Is this a hardware problem? If so, would a change of the keyboard resolve things?   [ At some stage I thought maybe the problem was caused by the fact the I have fiddled a little bit with the keyboard by lifting the :; key (next to L and under P) and applying a bit of WD40 to clean a tiny spil of sugary liqid that caused the key to get sticky.  But the volume keys are way far on top of keybord so my assumtion was/is that the volume changes would not be related to the cleaning. ]
    is this a software problem? Some thread on similar (not identical) issues had suggested there are some bugs in soft and Apple is aware. For this reason I gave Yosemite a go but the problem continues. Would reverting to Lion sole the problem you think?  [ Maybe I should ask here if anyone can suggest how to go about this downgrade as Option-Cmd-R key-combination press at start up does not give me the Interner Recovery scree anymore, but keeps taking me (just like Cmd-R) straight to the OSX Utilities where can wipe of the disk (which I did) and reinstall Yosemite only. ]
    I would very much apreciate any replies that might help me solve this issue.
    Many thanks
    Ty

    HI Ty ..
    Might be something you have no tried yet here >  Troubleshooting issues with no audio from built-in speakers on Macs

  • Why does Find not see a visible file at Volume level?

    I recently searched (Find) my iMac's internal hard drive for a file that I knew I had created ("MAC addresses.doc"), but it found no such file, either by File Name or Contents. I had to try to remember where I filed it, and then I found it in [Macintosh HD] > Library > Documentation > User Guides and Information. Searching (Find) again at the level of any folder within the volume, even Library, finds the file immediately, both by File Name and Content. The file has no unusual properties, and its Permissions allow everyone to at least Read it. This occurs even after repairing permissions of the volume. Why should the OS be unable to Find this file for me when searched on the volume name? Should I change some setting/preference in order to allow that (all files to be found at Volume level)?

    Thanks Frank,
    SYSTEM_PARAMETER is a table owned by X.  If I qualify the select statement by adding the owner it works, but of course I do not want to do that.  Here is the DDL for creating SYSTEM_PARAMETER:
    create table SYSTEM_PARAMETER
      name         VARCHAR2(256) not null,
      date_value   DATE,
      number_value NUMBER,
      string_value VARCHAR2(512),
      comments     VARCHAR2(512)
    alter table SYSTEM_PARAMETER add constraint PK_SYSTEM_PARAMETER primary key (NAME);
    Again, if I rewrite the procedure to the following (only difference is the red X.), it works:
    create or replace  procedure ztm_get_debug_level is
      vc_pkg_name  system_parameter.name%TYPE := 'DEBUG_LEVEL_PKG_BASE_KEYS';
      vn_error     services.debug_log_level.debug_level_id%TYPE := 30;
      v_debugLevel   system_parameter.number_value%TYPE;
      function get_owner return varchar2 is
        cursor c1 is
        select owner from all_tables where table_name = 'SYSTEM_PARAMETER';
        v_Ret_Val VARCHAR2(30);
      BEGIN
        OPEN C1;
        FETCH C1 INTO v_Ret_Val;
        CLOSE C1;
        RETURN v_Ret_Val;
      END;
    begin
      DBMS_OUTPUT.PUT_LINE('AAAA - ' || get_owner);
      select s.number_value
      into   v_debugLevel
      from   X.system_parameter  s
      where  s.name = vc_pkg_name;
      DBMS_OUTPUT.PUT_LINE('BBBB');
    exception
      when no_data_found then
        NULL;
      when others then
       DBMS_OUTPUT.PUT_LINE('p_get_debug_level.WHEN OTHERS');
       raise;
    end;
    This procedure exists in 4 other environments where there are no issues.  It can't be a privileges issue as the table is owned by user X and as you can see by the lookup (which was added for debug) against ALL_TABLES the owner is clearly X.  So, why can X not select from it's own table unless we include the owner?
    Thanks,
    Thomas

  • How can I lock a track volume level to never move in Garageband?

    Hi there
    I'm currently creating a backing track of a popular song and I have built up all the parts of the songs against a wav track which contains the original version of the song.
    I want to be able to mix the volumes of the tracks Ive built to the main proper recording, but I need to be able to LOCK the actual wav song track at say the 1.7db mark. Is this possible?
    As I cant do it now, I keep accidently adjusting the volume level of the actual wav song track, so then all my volume mixes on other tracks are rendered useless (As you cant UNDO a volume change back to how it was)
    Even if I engage the padlock "lock" button on the actual wav song track I can still move the volume of that track up and down. So its not 100% locked in my opinion.
    Any ideas?
    Thanks

    Hi
    Do you mean:-
    Select the track
    Click Down Arrow
    Make sure Track Volume is selected
    Click on the dot that has been created at the start of the track (to check its number level)
    Click on the line now showing at the very end of the song and make sure the NEW dot you've just created is at the same number level as the one at the start.
    As this seems to work.
    If I dont put any dots on it, you can move it as you please still.

  • My 10G iPod-Volume Levels Erratic + Freezing...HELP!

    Admittedly, I have a 3 year old 10G iPod. But I'd prefer to getting it working well if I can instead of junking it for a new model. We've been through a lot together...ha ha
    The problem with mine is that the volume levels jump in-between songs pretty often. I will be listening to it on the bus and then suddenly a new song will start at a mind-numbingly LOUD level, even though I have not touched the pad. At first I attributed it to how albums are randomly mastered at different volume levels, but I generally make a point to equalize them before loading onto the iPod. I also have the sound check function clicked ON.
    Anyone heard of this problem? any suggestions?
    It will also freeze playing occasionally, even though the song timer continues to play out. I'd say this happens every 20 songs or so. What's that about?
    Should I try to revert back to factory settings? Or should I just throw in the towel?

    Hi, i bought my Ipod touch 8g last week, now, when i play my music ( without earphones ) the volume is very low even though it is on full, in fact its pretty useless, it was much louder, has anyone got any ideas please? Thanks.
    Maureen.

Maybe you are looking for

  • Reconciliation between Bank statement and G/L

    Good afternoon, We're integrating our bank statements electronically and manually. Sometimes, the statement gets integrated, but the G/L accounts in FI are not updated; or the information in the statement is not correct and therefore the statement in

  • Load balancing and fault tolerance in BPEL PM

    BPEL documentation talks about the ability of clustering processes in BPEL PM Server for fault tolerance and Load balancing. Can anybody tell me how is it done? Thanks

  • Chart

    hi all, can any body help me how i can use DATAWEBBEAN chart in jsp thru jdeveloper. thanks in advance Shakeel

  • F1 help on Radiobutton

    Hi Guys, I have a requirement that there should be an F1 help on two radio buttons i  have. Is there any way i can achieve this?? Helpful answers will be rewarded suitably.

  • Monitoring Oracle session with SQL_ID

    Hi All, How can I know a SQL_ID belonging to a user/schema in Oracle. Can anyone post me the query to find the SQL QUERY/SQL_ID belonging to a user session. I have googled but dint get what i expected. Hope I get it here. We dont have OEM configured