Enums programs are not executing....?

class Shop1
enum Shop {SWEET,HOT}
Shop sh;
public class TestEnums
public static void main(String[] a)
Shop1 s1=new Shop1();
s1.sh=Shop1.Shop.SWEET;
this is the code which i tried to compile by using java1.5 but it is giving compilation error as
';' expected
enum Shop {SWEET,HOT}
^
why it is coming?

I am using Java 6 and this compiles and runs fine. I deleted Java 5 along time ago.

Similar Messages

  • Data objects in a Unicode program are not convertible?what does this mean?

    hello,everyone,
    when I execute a smartform directly in the transaction smartforms.,the result can be seen just no data.
    when I execute program to transfer two internal tables from interface with data to the smartforms,and I use tcode st22,
    the error is : Data objects in a Unicode program are not convertible.
    the error analysis; The statement
       "MOVE src TO dst"
    requires the operands "dst" and "src" to be comvertible.
    the source code that error occurs is :LOOP AT I_SHIP_DETAIL INTO WA_DETAIL .
    and I know that the internal table have errors ,I defined the internal table refer to a structure created myself,and I set break-point in the smartforms ,can see the data in the internal table ,so why occurs such errors ,pls help me if you know .thank you in advance.

    hi
    good
    go through this link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2dac69e-0e01-0010-e2b6-81c1e8e5ce50
    thanks
    mrutyun^

  • Include programs are not having Unicode checks active check box ?

    Hi all,
    Why the Include programs are not having Unicode checks active check box ?
    Thanks in advance
    KR

    >
    KR wrote:
    > Hi all,
    >
    > Why the Include programs are not having Unicode checks active check box ?
    >
    > Thanks in advance
    > KR
    Hi KR,
    First of all, Because of include programs not executable by any where, its mandatory to attach all the includes to one main program which is to be usefull for business or enduser purpose. Here only unicode concept will occurs whether the server is being used in only one country or many. if its used in only one country no need to go for unicode active checks, iff the server is used in more than one country, its mandatory to go for unicode checks active.
    Regards
    Arani Bhaskar

  • The preinstalled ilife programs are not showing up on my macbook pro

    I just bought a new macbook pro that had been returned to best buy. When I turned it on the ilife programs are not there like they are supposed to be. What do I need to do.

    You need to Register that Mac with Apple, Create an Apple ID (if you don't already have one) Log on to the Mac App Store with your Apple ID and then you should be able to download and install the iLife Apps that you want.
    BB foramatted the drive and reinstalled the OS. In doing so the iLife Apps were not re-installed as they are not part of the OS. So now it is up to you to get them.
    If the above steps don't work for you then you may need to call Apple to straighten it out.

  • Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    You have not provided any useful technical information like system specs, error messages or whatever. We don't even know your exact product version.
    Mylenium

  • Ipad1 programs are not openning

    after sync and tranfered pictures from computer to my ipad, all the purchesed programs are not openning any more, and it shows as opened in the background, but actually it just blinking !!!

    If it's happening on all the apps that you've downloaded from the App Store, but not the Apple built-in ones, then try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.
    If it's happening on all apps including Apple's then try closing them all completely and then see if they work when you re-open them : from the home screen (i.e.not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Scripts are not executing

    Hi,
    we have scheduled scripts through crontab,but from few days these scripts are not executing,there is no problem with time entries in crontab because some of them are executing correctly,what can be possible reasons for the cronjobs to not to execute.we are using sun solaris sparc 64 bit.oracle 10.1.0.4

    I can't say without knowing what the script does. Maybe somebody changed the permissions on another directory that script needs, or maybe another file it needs is no longer available, or ???
    Just suggesting a troubleshooting step. If you can run the script in a similar setup then you can eliminate the script as a likely problem. I didn't see anything on the crontab entry that looked to be a problem.
    PS: "will the date change with the execution of cronjob or it remains the same."
    No, the date on the cron daemon will stay the same. It just wakes up once a minute to check for things to do and kicks them off, it never restarts.

  • How do I prevent the Window Office applications from launching when my iMAC boots or recovers from sleep? I've tried System Preferences however the Office programs are not listed?

    How do I prevent the Window Office applications from launching when my iMAC boots or recovers from sleep? I've tried System Preferences however the Office programs are not listed?

    lunagirl wrote:
    The first 3 apps listed are not installed because I have not run the activation assistant for the Office trial that came with the T61.  Add/Remove programs has only these pre-installed apps:
    Microsoft Office 2003 Web Components
    Microsoft Office 2007 Primary Interop Assemblies
    Microsoft Office Small Business Connectivity Components
    MS SQL Server 2005
    MS SQL Server Native Client
    MS SQL Server Setup Support Files
    MS SQL Server VSS Writer
    Is the activation assistant one of them?
    No, AFAIK should be listed as Microsoft Office Suite Activation Assistant
    Rgds,
    Ahti

  • Af:commandMenuItem action and actionListener are not executing

    Hello all!
    I use JDeveloper Studio Edition Version 11.1.1.2.0. Here's the problem. I have a popup menu like this
    <af:popup id="someMenu" animate="default">
    <af:menu id="pt_m1">
    <af:forEach var="item" items="#{ContextMenuHelperBean.availableUserRoles}">
    <af:commandMenuItem text="#{item.roleName}"
    action="#{ContextMenuHelperBean.changeUserRole_Action}"
    actionListener="#{ContextMenuHelperBean.changeUserRole_ActionListener}"
    immediate="true"
    partialSubmit="false"
    id="pt_cmi1" rendered="true">
    <f:attribute name="userRole" value="#{item}"/>
    </af:commandMenuItem>
    </af:forEach>
    </af:menu>
    </af:popup>
    The problem is that action and actionListener are not executing, when the menu item is selected (but the page is reloaded with no changes). ContextMenuHelperBean has a "session" scope set in adfc-config.xml. What can be wrong with this?

    Now I've encountered a new kind of error. I create a menu in a managed bean like this:
    In JSPX
    <f:view beforePhase="#{RolesMenuSupportBean.createMenus}">
    <af:popup id="cxtMenu" animate="default">
                            <af:menu id="pt_m1"
                                     binding="#{RolesMenuSupportBean.rolesMenu}">
                            </af:menu>
                          </af:popup>In com\cs\webb2\view\utils\menu\RolesMenuSupport.java
        public void createMenus(PhaseEvent phaseEvent) {                       
            List<IUserRole> rolesList = getAvailableUserRoles();
            for (IUserRole role: rolesList) {           
                Boolean hasItem = false;           
                for (Iterator iter = rolesMenu.getChildren().iterator(); iter.hasNext(); ) {
                    RichCommandMenuItem item = (RichCommandMenuItem) iter.next();
                    if (!hasItem)
                        hasItem = item.getText().equalsIgnoreCase(role.getRoleName());
                if (!hasItem) {
                    RichCommandMenuItem newItem = new RichCommandMenuItem();                                                       
                    newItem.getAttributes().put("userRole", role);
                    newItem.setText(role.getRoleName());
                    newItem.setId(ITEM_ID);               
                    newItem.setActionExpression(getActionExpression("#{RolesMenuSupportBean.changeUserRole_Action}"));                           
                    newItem.addActionListener(getExpressionActionListener("#{RolesMenuSupportBean.changeUserRole_ActionListener}"));                               
                    rolesMenu.getChildren().add(newItem);  
        } The menu is created successfully, but when I click on any item, I get an exception
    <b>javax.servlet.ServletException: Method not found: com.cs.webb2.view.utils.menu.RolesMenuSupport@d4702.changeUserRole_Action(void)</b>
    But of course I have such a method in my com.cs.webb2.view.utils.menu.RolesMenuSupport:
    In com\cs\webb2\view\utils\menu\RolesMenuSupport.java
        public String changeUserRole_Action()
            System.out.println("Action!");
            // no code yet
            return "adfMenu_Main";
        }And there <b>is</b> a managed bean named RolesMenuSupportBean, which is associated with class com.cs.webb2.view.utils.menu.RolesMenuSupport.
    Can anyone tell me, what can be wrong?

  • Qosmio G40 hangs and some programs are not responding

    Hello and happy holidays to all.
    Please could i get some help with my G40?
    The pc is hanging and refusing to work.
    Ccreens lock and i get constant messages that the program(s)are not responding.
    I have run all checks i could find, chkdsk in cmd prompt, defrag etc. There are no problems reported.
    I have used system mechanic professional to check registry and everything else, again nothing that is not to be expected was reported.
    I have run every virus and malcious software test.
    I think i would like to restore the pc to factory settings but cannot find any option to do so.
    Any ideas
    stafford

    Hi!
    If you want to restore the notebook to factory settings and you have Vista, you must boot from the recovery disks or press F8 at startup and then choose Repair my Computer and follow the menu instructions.
    If you have Windows XP, you need the recovery disks.
    Before you do this, backup your data first. The HDD will completely erase.
    I think also its the best way to reinstall Windows but you should also check if you have the newest BIOS:
    http://eu.computers.toshiba-europe.com => Support & Downloads => Download Drivers
    Bye

  • Preuut and postuut sequences are not executing when run using UI. They run when using the sequence editor.

    I am using TestStand 3.5 and LabVIEW 8 in a Windows XP environment.
    I have a sequence that runs properly when run from the sequence editor.  I have made a few minor mods to the simple Operator Interface that ships with TestStand.  When I run my sequence using the modified Operator Interface, the PreUUT and PostUUT sequences do not execute.  Only the main sequence executes.  This also happens when I run the demo sequences that ship with TestStand.
    What am I missing?

    Hi,
    It sound like you are executing the sequences without the process model, do you get a report at the end of the execution?
    What are these minor mods you have done?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Work Flow EVENT - SM58 Entries are not executing automatically

    Hi Experts,
    I have used the standard BOR2034 for creating PO after saving the contract.
    I have developed an RFC enabled FM refering to the Standard FM SWW_WI_CREATE_VIA_EVENT.
    Inside the custom FM I am calling the BAPI_PO_CREATE1 for creating PO.
    After creating a contract using VA41 I am able to see in Event trace that my Event with corresponding custom FM is triggering.
    and the two entries are created in SM58 - Transactional RFC one is my Custom FM name and another is SWF_EVT_HANDLER_START_INTERNAL.
    When I execute the LUW by selecting execution, PO is getting created. Where as this entries are not picking automatically.
    I want to know, whether I have missed any step in process or do we need to schedule any job for automatically clearing the SM58 queue entries.
    Please help me in resolving the issue.
    Responses are highly appreciated..
    Warm Regards...

    Hi Natasha,
    As you say that you see the below entries in TRFC monitor, you need have a commit work after the below FMs are called(just one will do),
    the two entries are created in SM58 - Transactional RFC one is my Custom FM name and another is SWF_EVT_HANDLER_START_INTERNAL.
    How and from where are the above FMs called?
    Regards,
    Chen

  • Delete command are not executed in function of Java Bean

    Hello Sir,
    In Java bean have a function submitData.I want in this function run delete command through PreparedStatement..But Its not executed.
    Please review..
    public void submitData()
         try
    System.out.println("Printed*************************************************************");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("delete  from simple where NAME='?' and BNAME='?' ");
    String User=getUserName();
    st.setString(1,User);
    String Bname=getBookName();
    st.setString(2,Bname);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    System.out.println("Your Book are Submitted *****************");
    catch(Exception e)
    e.printStackTrace();
    }Thanks.

    Dear Sir,
    I removed the singleaquotes from preparedstatement.But Its not executed in this function.Like:
    public void submitData()
         try
    System.out.println("Printed*************************************************************");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("delete  from simple where NAME=? and BNAME=? ");
    String User=getUserName();
    st.setString(1,User);
    String Bname=getBookName();
    st.setString(2,Bname);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    System.out.println("Your Book are Submitted *****************");
    catch(Exception e)
    e.printStackTrace();
    }Allthough Insert command is properly executed in another function of Java Bean.
    Please review...
    Thanks.

  • Some of my programs are not working on Yosemite, how can I get mavericks back?

    Hello,
    I have upgraded to Yosemite, however some of my programs will not work. Is there any way that I can go back to the older Mac Os x?
    -J

    I would suggest you to post the query on Apple forums.
    You may also refer
    How can I uninstall OS X Yosemite and return to... | Apple Support Communities
    Is there any error message while you are trying to use Adobe products?

  • My compiled program will not execute on my PC.

    I am new to Java so is there anyone out there who can help me with a problem. I have a compiled Java program, the basic Hello World beginner's file. The file will compile, but not execute. It will execute on other computers, but not mine. Can anyone help me? I would greatly appreciate it. Oh yeah, I'm using jdk1.5.0_07. Thanks.

    Download JAVA Software Developement Kit (SDK previously JDK) from http://java.sun.com/javase/downloads/index.jsp
    Install the executable file just downloaded.
    Search for command.exe file inside C:\Windows\System32 and copy it to the 'bin' folder inside the jdk folder (say C:\Program Files\Java\jdk1.5.0_08\bin ).
    Now double click open the command.exe file and ( something like this will be displayed c:\PROGRA~1\.....\BIN>) type edit autoexec.bat
    Now type set path=%path%; c:\jdk..complete path (in my case set path=%path%;C:\Program Files\Java\jdk1.5.0_08\bin\autoexec.bat). For more info on setting path http://www.javacoffeebreak.com/tutorials/gettingstarted/part1b.html
    Save the file and exit.
    Thats it! Happy programming...
    -Madhu.
    Message was edited by:
    Madhu84

Maybe you are looking for

  • I've just purchased the photographer's package, but the download for Lr doesn't show in my app list?

    I've just purchased the photographer's package, but the download button for Lightroom doesn't show in my app list. How come? I've checked everything and my computer system should be able to run it perfectly.

  • How to turn on both LAN and Wireless T430

    I need both my LAN and wireless enabled at the same time.  Can I turn them both on using Think Advantage?  I believe our IT dept has uninstalled any ThinkAdvantage software.  Which ThinkAdvantage software should I download and where do I turn both th

  • Safari plug-ins not recgnized correctly

    I play a certain game on the web that requires SUN Java. The java works, but it will not play the sound. The latest plugin (excluding Java 5) was 1.4. My browser keeps saying the current plug-in is 1.3.1. How do I get it to recognize the current plug

  • Visible Property of lable in Webdynpro

    Hi all, I have a lable and a inputfield which are hide. I want that when a select something in my dropdownbykey, this two objects get visible. How can i do that? Regards, Nirali

  • Urban Terror crashes upon startup

    Hello, I installed Urban Terror a few days ago and it worked absolutely fine. I did a system update which is what I'm assuming broke it, but I'm not quite sure what's broken. Here's the terminal error output from when I run it: Any help is certainly