Exception doubts (urgent)

Question no 1 :
Given:
boolean bool = true;
if(bool = false) {
System.out.println("a");
} else if (bool) {
System.out.println("c");
} else if (!bool) {
System.out.println("c");
} else {
System.out.println("d");
What is the result?
A. a
B. b
C. c
D. d
E. Compilation fails.
Question no 2:
class Super {
public int i = 0;
public Super(String text) {
i = 1;
public class Sub extends Super {
public Sub(String text) {
i = 2;
public static void main(String args[]) {
Sub sub = new Sub("Hello");
System.out.println(sub.i);
What is the result?
A. 0
B. 1
C. 2
D. Compilation fails.
Question no 3 :
Given:
try {
int x = 0;
int y = 5 / x;
} catch (Exception e) {
System.out.println("Exception");
} catch (ArithmeticException ae) {
System.out.println("Arithmetic Exception");
System.out.println("finished");
What is the result?
A. finished
B. Exception
C. Compilation fails.
D. Arithmetic Exception
Question no 4 :
public class SyncTest{
public static void main(String[] args) {
final StringBuffer s1= new StringBuffer();
final StringBuffer s2= new StringBuffer();
new Thread () {
public void run() {
synchronized(s1) {
s2.append("A");
synchronized(s2) {
s2.append("B");
System.out.print(s1);
System.out.print(s2);
}.start();
new Thread() {
public void run() {
synchronized(s2) {
s2.append("C");
synchronized(s1) {
s1.append("D");
System.out.print(s2);
System.out.print(s1);
}.start();
Which two statements are true? (Choose Two)
A. The program prints "ABBCAD"
B. The program prints "CDDACB"
C. The program prints "ADCBADBC"
D. The output is a non-deterministic point because of a possible deadlock condition.
E. The output is dependent on the threading model of the system the program is
running on.

Bloody cross-poster
http://forum.java.sun.com/thread.jspa?threadID=639843
Do your homework yourself.

Similar Messages

  • Exception - Doubt in Finally

    i have doubt in finally block..
    we know, the finally block statements execute whether the
    exception raises in try block or not..
    but in my program the print statement working after try block
    without using finally block..
    pls anyone expalin about this very clearly..
    for example:
    class excep{
         static void demo(){
              try{
                   int i=1/0;
                   System.out.println(i);
              }catch(ArithmeticException e){
                   System.out.println(e.getMessage());
              System.out.println("Executing Finally");
         public static void main(String ar[]){
              demo();
    output:
    / by zero
    Executing Finally
    thanks

    Hi
    If in your catch block you would have thrown a new exception or the same exception that you got, then the system.out.println wouldn't have been executed. Only if it would have been inside a finally block.
    So:
    class excep{
    static void demo(){
    try{
    int i=1/0;
    System.out.println(i);
    }catch(ArithmeticException e){
    throw new Exception();
    System.out.println("Executing Finally");
    public static void main(String ar[]){
    demo();
    you wouldn't get "Executing Finally" on the console.
    but:
    class excep{
    static void demo(){
    try{
    int i=1/0;
    System.out.println(i);
    }catch(ArithmeticException e){
    throw new Exception();
    finally {
    System.out.println("Executing Finally");
    public static void main(String ar[]){
    demo();
    "Exceuting Finally" would be printed to the console.

  • WLS 5.1 sp9 and ACL exception! Urgent!

    Hi:
    My applcation runs correctly on sp8.
    Now even some of my jsp cannot run correctly with sp9. It also
    compliants security exception. But strangely the first time WLS compiles
    the
    jsp, it can run correctly, the data is shown in the browser. But once
    the
    jsp is compiled, all subsequent call of this jsp will resort to
    assertion
    error.
    Funny, seems the reason is that WLS sp9 changes the steteful beans
    security checking. Previously the checking seems to be when the home is
    obtained, now the checking seems to be in the time only the method is
    called.
    I am uisng bean home cache. Is it the cause of this error? I can get
    around this by giving the jndi to guest, but it is not what i want. I
    still
    want to protect my beans jndi.
    I need the solution urgently. Otherwise i have to roll back to sp8.
    Thanks.
    minjiang
    See the stack trace below:
    Mon Jul 02 16:36:58 SGT 2001:<I> <EJB JAR deployment
    d:/weblogic/myserver/kbf_de
    ploy/ordermgr.jar> Transaction: '994062053580_3435' rolled back due to
    EJB
    excep
    tion:
    javax.naming.NoPermissionException: User guest does not have lookup
    permission
    on kbf
    at
    weblogic.jndi.internal.NamingSecurityManagerImpl.checkPermission(Nami
    ngSecurityManagerImpl.java:100)
    at
    weblogic.jndi.internal.NamingSecurityManagerImpl.checkLookup(NamingSe
    curityManagerImpl.java:45)
    at
    weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:
    737)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at
    weblogic.ejb.internal.StatefulEJBHome.wrapEJBObject(StatefulEJBHome.j
    ava:170)
    at
    weblogic.ejb.internal.StatefulEJBHome.findOrCreateEJBObject(StatefulE
    JBHome.java:275)
    at
    weblogic.ejb.internal.StatefulEJBHome.findOrCreateEJBObject(StatefulE
    JBHome.java:258)
    at
    com.kbf.ejb.order.OrderBeanHomeImpl.findByPrimaryKey(OrderBeanHomeImp
    l.java:98)
    at
    com.kbf.ejb.order.OrderBeanHomeImpl_ServiceStub.findByPrimaryKey(Orde
    rBeanHomeImpl_ServiceStub.java:262)
    at
    com.kbf.ejb.ordermgr.OrderManagerBean.getOrders(OrderManagerBean.java
    :695)
    at
    com.kbf.ejb.ordermgr.OrderManagerBeanEOImpl.getOrders(OrderManagerBea
    nEOImpl.java:872)
    at
    com.kbf.ejb.ordermgr.OrderManagerBeanEOImpl_ServiceStub.getOrders(Ord
    erManagerBeanEOImpl_ServiceStub.java:311)
    at
    com.kbf.webremotemgr.WebRemoteMgr.getOrders(WebRemoteMgr.java:1500)
    at jsp_servlet._orderview._jspService(_orderview.java:349)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:915)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:879)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:365)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

    Actually this is wrong. The "guest" prompts me to type in the "system"
    credentials, before it can run everyting correctly.
    So i must still miss out something.
    Can anybody help me solve this?
    mj
    minjiang wrote:
    Hi:
    After i set this, it works for my jsp.
    weblogic.allow.execute.weblogic.servlet=guest
    Previously it is =everyone.
    So can anyone tell me what the difference is between everyone and guest?
    I thought they are same.
    And, i still have one problem with my beans. See my next post.
    Thanks.
    minjiang
    minjiang wrote:
    Hi:
    My applcation runs correctly on sp8.
    Now even some of my jsp cannot run correctly with sp9. It also
    compliants security exception. But strangely the first time WLS compiles
    the
    jsp, it can run correctly, the data is shown in the browser. But once
    the
    jsp is compiled, all subsequent call of this jsp will resort to
    assertion
    error.
    Funny, seems the reason is that WLS sp9 changes the steteful beans
    security checking. Previously the checking seems to be when the home is
    obtained, now the checking seems to be in the time only the method is
    called.
    I am uisng bean home cache. Is it the cause of this error? I can get
    around this by giving the jndi to guest, but it is not what i want. I
    still
    want to protect my beans jndi.
    I need the solution urgently. Otherwise i have to roll back to sp8.
    Thanks.
    minjiang
    See the stack trace below:
    Mon Jul 02 16:36:58 SGT 2001:<I> <EJB JAR deployment
    d:/weblogic/myserver/kbf_de
    ploy/ordermgr.jar> Transaction: '994062053580_3435' rolled back due to
    EJB
    excep
    tion:
    javax.naming.NoPermissionException: User guest does not have lookup
    permission
    on kbf
    at
    weblogic.jndi.internal.NamingSecurityManagerImpl.checkPermission(Nami
    ngSecurityManagerImpl.java:100)
    at
    weblogic.jndi.internal.NamingSecurityManagerImpl.checkLookup(NamingSe
    curityManagerImpl.java:45)
    at
    weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:
    737)
    at
    weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at
    weblogic.ejb.internal.StatefulEJBHome.wrapEJBObject(StatefulEJBHome.j
    ava:170)
    at
    weblogic.ejb.internal.StatefulEJBHome.findOrCreateEJBObject(StatefulE
    JBHome.java:275)
    at
    weblogic.ejb.internal.StatefulEJBHome.findOrCreateEJBObject(StatefulE
    JBHome.java:258)
    at
    com.kbf.ejb.order.OrderBeanHomeImpl.findByPrimaryKey(OrderBeanHomeImp
    l.java:98)
    at
    com.kbf.ejb.order.OrderBeanHomeImpl_ServiceStub.findByPrimaryKey(Orde
    rBeanHomeImpl_ServiceStub.java:262)
    at
    com.kbf.ejb.ordermgr.OrderManagerBean.getOrders(OrderManagerBean.java
    :695)
    at
    com.kbf.ejb.ordermgr.OrderManagerBeanEOImpl.getOrders(OrderManagerBea
    nEOImpl.java:872)
    at
    com.kbf.ejb.ordermgr.OrderManagerBeanEOImpl_ServiceStub.getOrders(Ord
    erManagerBeanEOImpl_ServiceStub.java:311)
    at
    com.kbf.webremotemgr.WebRemoteMgr.getOrders(WebRemoteMgr.java:1500)
    at jsp_servlet._orderview._jspService(_orderview.java:349)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:915)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:879)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:365)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)

  • RFC Adapter - JCO Exception - Please Urgent

    I am developing a scenario from File--RFC integration.  I am using File and RFC adapter to perform this transaction.
    The File Adapter is picking the file properly and the trnaformation (Mapping Program) is also happening properly.  But the RFC is throwing the following error.  I got this error info from the Runtime Workbench.
    Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZPS_XI_ACTIVITY_CREATE in remote system (RfcClient[BAPI_CreateActivity_Receiver]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR
    Error Delivery of the message to the application using connection AFW failed, due to: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZPS_XI_ACTIVITY_CREATE in remote system (RfcClient[BAPI_CreateActivity_Receiver]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR.
    The RFC is executing without any problem when I execute this from the transaction SE37.
    I have created communication channel in Integration Directory in appropriate manner. 
    I also created RFC destination in the XI system (TCODE SM59) and the same is using in the "Receiver Determiiation - Service".
    I have not done any configuration at SAP R/3 side.  Is any config required at R/3 end for this scenario - please let me know.
    Please throw some light on this.  I will greatly appreciate your help.

    Friends,
      Please suggest on this vague problem that I am facing.  Your help would be greatly appreciated.
    1. I am using SAP-PS (Projects & Systems) BAPI 'BAPI_BUS2002_ACT_CREATE_MULTI' to create the activities for a project.  According to this BAPI documentation,
    - First call 'BAPI_PS_INITIALIZATION' before make this BAPI call
    - After BAPI call, we should use 'BAPI_PS_PRECOMMIT' and 'BAPI_TRANSACTION_COMMIT'.
    2. Hence, I have developed Z-Func Module with Initialize, BAPI call - then Pre Commit and Commit.
    3. This is executing from SE37 without any issues.  Other parameters to make a remote call is also set properly.
    4. To make sure that, I made a JCO call from Java Program using PDK for Java.  This is also working fine.
    5. But when I used this in the XI scenario (File-XI-RFC) this is showing ABAP dump and this is invoking from Pre-Commit module.
    I couldn't figure it out why it's happening like this.
    I did lot of troubleshooting and the details are as follows for your reference.
    1. The mapping program is working fine without any issues.  I confirmed this by writing these input values to the file (ofcourse lot of pain) inside the function module.  All the values have been parsed by XI and coming to Func Module as expected.
    2. No issues with logical destinations (SM59).
    3. I have tried other options such as clearing the Cache...etc.
    Hence, please throw up some light.  If any body tried with these kind of BAPI (needs initialize, pre-commit and commit) I really appreciate your effort.
    <b>Can we enable the debugging of func module when the XI makes a call...?</b>  - I tried with Standard options that seems doesn't work.

  • ** RFC to JDBC scenario - SYSTEM_FAILURE exception comes - urgent help

    Hi Friends,
    I have completed RFC to JDBC scenario. When execute RFC in the system, it throws an exception SYSTEM_FAILURE. What could be the problem ..?  The message is not entered into SXMB_MONI. In the backend system itself, it throws error.
    Kindly reply, friends.
    Kind Regards,
    Jeg P.

    Hi Jeg,
    Check out if u get any info/help in the thread below .. Henrique Pinto's reply and others to this thread.
    How to make Real Time connectivity between R3(RFC) Sender and XI
    File Adapter: SYSTEM_FAILURE_INTERNAL
    More details regarding this exception:
    http://help.sap.com/saphelp_nw04/helpdata/en/22/0425e0488911d189490000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a2/a002416225f023e10000000a155106/frameset.htm
    kanan

  • Callable statement doubt-urgent

    hi all,i got a problem in callable statements.i know how to pass parameters to a procedure using a callable statement.but this time i need to pass a table name as a parameter.the problem is if i get that variable as a IN parameter in the procedure then how do you put that parameter in place of table name inside the procedure.heres a example,the pocedure is in oracle
    i am passing variable a from java
    create or replace procedure (a in varchar2)
    begin
    select * from <the parameter passed through a> where <condition>
    end;
    how can this be done.the select statement is given only as a example.the errors in the select are not emphasized here.the focus is on the table name.if there is any other way to do this do let me know.please reply fast.this is urgent.any kind of help is welcome.bye thiyagu.

    In some databases the SQL used in your stored procedure can reference 'variables' that contain the values to be used at statement execution time. This will be covered in your database's SQL reference. If this is not supported by your database you will have to perform a 'switch' based on the table name passed and select the SQL statement to be executed.

  • GLT0 TABLE DOUBT - URGENT

    hi exports
    i want to take gl account balance GLT0 table?
    but i've some field month wise like HSL01 (apr), HSL02(may), HSL03(jun) like wise? i want to take credit, debit and balance how can i take wht is the prog. i want to take month wise ? how? my parameter company code, year and gl account no?
    pls help me urgent

    Hi,
    use fm 'READ_SKC1A':
    select-options monat for bkpf-monat.
      CALL FUNCTION 'READ_SKC1A'
           EXPORTING
                XBUKRS         = KONTO-BUKRS
                XGJAHR         = JAHR
                XGSBER         = KONTO-GSBER
                XSAKNR         = KONTO-KSTAR
           IMPORTING
                XSKC1A         = SKC1A
           EXCEPTIONS
                KEY_INCOMPLETE = 1
                NOT_AUTHORIZED = 2
                NOT_FOUND      = 3
                OTHERS         = 4.
      IF SY-SUBRC = 0.
    *------ Umsatz    der Berichtsperiode in HW ermitteln -----------------
        ADD   SKC1A-UM01O THEN SKC1A-UM02O UNTIL SKC1A-UM16O
              GIVING WERTE-UMSATZ ACCORDING TO MONAT.
    endif.
    A.
    pls reward useful answers
    thank you!

  • App Server changes the actual exception thrown [URGENT]

    Hello All,
    I am getting a very typical problem with SJS Platform Edition 8.1_01. I have a form to delete a record from table which throws an exception with oracle error in message as "ORA-02292: integrity constraint (some_constraint name) violated - child record found" .
    Another code checks the message and converts it into more user friendly message to be displayed. This word fine when application runs in Studio. Problem arises when the application is deployed on Application Server. Here, the message is provided when same exception is thrown as "java.rmi.RemoteException: Unidentified Trap Session : nested exception is: java.rmi.RemoteException: nested exception is: java.rmi.RemoteException: "
    Since this doesn't contain any ORA error no. the message is not converted to user friendly message.
    I am not able to find out the reason for this as the same code works well on IBM Websphere studio/ App Server and also works fine on Sun Java Studio {jstudio_04Q4}.
    Is there any configuration change that I need to do on SJS Platform Edition 8.1_01 or is there any setting which truncate the actual message of exception because in log I can see the whole message as "java.rmi.RemoteException: Unidentified Trap Session : nested exception is: java.rmi.RemoteException: nested exception is: java.rmi.RemoteException: Remote Entity Remove:  delete from CARD_MASTER where CARD_TYPE = ? ORA-02292: integrity constraint (ORACLE.FK_PROMO_CARD) violated - child record found"
    Please help ASAP as this is becoming very critical.

    I'm not sure what do you mean that it works with Studio?
    You can see an exception text when you execute the SQL?
    To check the actual exception text, you need to catch
    the exception on the server side (i.g. in a Session Bean),
    make sure the transaction is rolled back (if you need so),
    and re-throw it as a checked exception to make sure the
    text is untouched.
    Regards,
    -marina

  • CS Doubts urgent

    Hello all,
    I have a problem in running a scenario of CS. My scenario the is a machinery which consists of components and warranty was for only some few sub components.
    Ex:
    Taking consideration into a Mobile phone, the company is giving warranty for only battery. I do i classify it?
    Is this the order to create and please suggest me the way to create. That will be very much helpful to me.
    1)Material creation
    2)characteristics and class assignment to material
    3)Creating contract and (assigning serial no to the line item in sales order at technical objects in extras tab)
    4)Taking reference of contract i will create sale order and deliver the material and billing it.
    5)After some period if the machine had got a problem we will create a service notification based upon the customer explanation.
    6) Technician will go to customer site and analyze the problem and prepare the quotation of the repaired part.
    7) After the confirmation from customer about quotation we will generate work order.
    8) Receipt of return material and raise of work completion order.
    9)Billing wrt order.
    While delivering how can we say that the warranty will starts on that day and warranty finishes on the particular day.
    Similarly, while taking the mobile phone example into consideration how can i get an msg that there is a "warranty for battery".
    Is there any functionality for creating BOM and assigning equipment for that.
    Please send the contact no so that i can contact you immediately.
    Kindly help me in solving the issue in a greater time.
    With Regards,
    C Chaitanya

    One of the definitions of insanity is repeatedly performing the same action expecting a different outcome. You've posted this question twice before, and it's been locked. You've been told:
    Please don't use -urgent- in you query.
    Use a proper subject.
    Don't ask for contact numbers.
    Read the rules before posting again.
    Thread locked. Again.

  • Stuts doubt urgent

    am using <html:options> for populating the drop down but am getting the following error
    __root cause__
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name collect
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
         org.apache.jsp.Solution_jsp._jspService(Solution_jsp.java:90)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    My code is
    JSP
              <html:select property="issue">
              <html:options collection="collect" property="id" labelProperty="description"/>
              </html:select>
    Form:
    package base.src;
    import java.util.ArrayList;
    import org.apache.struts.action.ActionForm;
    public class SolutionForm extends ActionForm
         private static final long serialVersionUID = 1L;
         private String issue;
         private ArrayList collect=null;
         public final String getIssue() {
              return issue;
         public final void setIssue(String typ) {
              this.issue = typ;
         public final ArrayList getCollect() {
              return collect;
         public final void setCollect(ArrayList coll) {
              this.collect =coll;
    Action class:
    package base.src;
    import javax.servlet.http.HttpServletRequest;
    //import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    //import java.sql.*;
    import java.util.Collection;
    //import java.util.ArrayList;
    public class SolutionAction extends Action
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception
         SolutionServ obj=new SolutionServ();
         Collection collect=obj.getIssue();
    request.setAttribute("collect",collect);
         SolutionForm form1=(SolutionForm)form;
         form1.setIssue("2");
         return(mapping.findForward("continue"));
    }

    deepa@22 wrote:
    am using <html:options> for populating the drop down but am getting the following error
    __root cause__
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name collect
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
         org.apache.jsp.Solution_jsp._jspService(Solution_jsp.java:90)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    My code is
    JSP
              <html:select property="issue">
              <html:options collection="collect" property="id" labelProperty="description"/>
              </html:select>
    Form:
    package base.src;
    import java.util.ArrayList;
    import org.apache.struts.action.ActionForm;
    public class SolutionForm extends ActionForm
         private static final long serialVersionUID = 1L;
         private String issue;
         private ArrayList collect=null;
         public final String getIssue() {
              return issue;
         public final void setIssue(String typ) {
              this.issue = typ;
         public final ArrayList getCollect() {
              return collect;
         public final void setCollect(ArrayList coll) {
              this.collect =coll;
    Action class:
    package base.src;
    import javax.servlet.http.HttpServletRequest;
    //import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    //import java.sql.*;
    import java.util.Collection;
    //import java.util.ArrayList;
    public class SolutionAction extends Action
    public ActionForward execute(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception
         SolutionServ obj=new SolutionServ();
         Collection collect=obj.getIssue();
    request.setAttribute("collect",collect);
         SolutionForm form1=(SolutionForm)form;
         form1.setIssue("2");
         return(mapping.findForward("continue"));
    }What happens when you try with something like the one below
    <html:select property="issue">
          <html:options name="formBeanName"  collection="collect"  property="id"  labelProperty="description"/>
    </html:select> and please restructure your form bean something like the one below
    package base.src;
    import java.util.ArrayList;
    import org.apache.struts.action.ActionForm;
    public class SolutionForm extends ActionForm  {
          private static final long serialVersionUID = 1L;      
          private String issue = new String();
          private List collect = new ArrayList();
         public String getIssue() {
              return this.issue;
         public  void setIssue(String issue) {
              this.issue = issue;
         public List getCollect() {
              return collect;
         public  void setCollect(List collect) {
              this.collect = collect;
           /** make sure you overide respective Abstract Method like the validate method as we are extending ActionForm*/
    }Hope that might help :)
    REGARDS,
    RaHuL

  • Doubt - urgent

    hi
    i have a doubt in java. do java have any classed to list the drives, files and folder in a GUI format.. as windows does. i know there are controls in VB for listing the drives, folders and file. is there any class in java of this sort
    charles

    Both Aldaris and Yogee have the correct answer but in different ways. Aldaris' answer will give you the listing although it ideally, should recurse through sub-directories. Yogee gives you a GUI component to choose or save files. A third alternative would be to use a JTree. There are numerous examples of trees containing a directory structure, on the web.
    Good luck.

  • Regarding Overriden method Exception----very urgent

    if we override a method , Is this method can throw a super class exception of overridden method...
    i.e
    class Base
    public void show() throws Exception1
    class Derived extends Base
    public void show() throws Exception2
    Is Exception 2 should be the subclass of Exceptio 1 or not.........is there any contraint...............bcz some conditions are working some are not working....
    if question is not clear....let me know i will explain clearly

    Information collected from the site:
    The Overridden Method can throw either Same Exception or Subclass of that Exception defined the base class method.
    Even if the base class method is throwing an Exception, it is not mandatory that the overridden method should throw any Exception (We can override that method without throwing any Exception)
    Irrespecive of the Exception throws in the Base class method, Overridden method can throw any RuntimeException.
    Reference: http://javalive.com/modules/articles/article.php?id=19
    Case 1: this code giving compilation error ( as per the rule i.e overridden method exception should be subclass of base class method exception)
    class Base
    Public void test() throws NullPointerException
         System.out.println(�hello�);
    Class Derived extends Base
         Public void test() throws Exception
         System.out.println(�hello�);
    Case 2: this code is compiling properly, but it should give compile time error as per the rule�.Why.?
    class Base
    Public void test() throws NullPointerException
         System.out.println(�hello�);
    Class Derived extends Base
         Public void test() throws RuntimeException
         System.out.println(�hello�);
    }

  • Garbagecollection doubts(urgent)

    I want the answer for this question ?
    question no : 1
    1.public class X (
    2. public object m () {
    3. object o = new float (3.14F);
    4. object [] oa = new object [1];
    5. oa[0]= o;
    6. o = null;
    7. return oa[0];
    8. }
    9. }
    When is the float object created in line 3, eligible for garbage collection?
    A. Just after line 5
    B. Just after line 6
    C. Just after line 7 (that is, as the method returns)
    D. Never in this method.
    please send the answers to the above question to my mail id [email protected]
    question no : 2
    Given:
    10. public Object m() {
    11. Object o = new Float(3.14F);
    12. Object [] oa = new Object[1];
    13. oa[0] = o;
    14. o = null;
    15. return oa[0];
    16. }
    When is the Float object, created in line 11, eligible for garbage collection?
    A. Just after line 13.
    B. Just after line 14.
    C. Never in this method.
    D. Just after line 15 (that is, as the method returns).
    please send the answers to the above question to my mail id [email protected]
    question no : 3
    1. class Bar { }
    1. class Test {
    2. Bar doBar() {
    3. Bar b = new Bar();
    4. return b;
    5. }
    6. public static void main (String args[]) {
    7. Test t = new Test();
    8. Bar newBar = t.doBar();
    9. System.out.println(�newBar�);
    10. newBar = new Bar();
    11. System.out.println(�finishing�);
    12. }
    13. }
    At what point is the Bar object, created on line 3, eligible for garbage collection?
    A. After line 8.
    B. After line 10.
    C. After line 4, when doBar() completes.
    D. After line 11, when main() completes.
    please send the answers to the above question to my mail id [email protected]
    question no : 4
    12. void start() {
    13. A a = new A();
    14. B b = new B();
    15. a.s(b);
    16. b = null;
    17. a = null;
    18. System.out.println(�start completed�);
    19. }
    When is the B object, created in line 14, eligible for garbage collection?
    A. After line 16.
    B. After line 17.
    C. After line 18 (when the methods ends).
    D. There is no way to be absolutely certain.
    E. The object is NOT eligible for garbage collection.
    please send the answers to the above question to my mail id [email protected]
    question no : 5
    1. class TestA {
    2. TestB b;
    3. TestA() {
    4. b = new TestB(this);
    5. }
    6. }
    7. class TestB {
    8. TestA a;
    9. TestB(TestA a) {
    10. this.a = a;
    11. }
    12. }
    13. class TestAll {
    14. public static void main (String args[]) {
    15. new TestAll().makeThings();
    16. // ...code continues on
    17. }
    18. void makeThings() {
    19. TestA test = new TestA();
    20. }
    21. }
    Which two statements are true after line 15, before main completes? (Choose two)
    A. Line 15 causes a stack overflow.
    B. An exception is thrown at runtime.
    C. The object referenced by a is eligible for garbage collection.
    D. The object referenced by b is eligible for garbage collection.
    E. The object referenced by a is not eligible for garbage collection.
    F. The object referenced by b is not eligible for garbage collection.
    please send the answers to the above question to my mail id [email protected]

    Hi All,
    All are not related to one single load.
    NO ODS concept here. Direct datatarget only.
    If I select <b>PSA then Data target :</b>
    It shows message :
    (0 records from 152)
          Data not received in PSA Table
          Diagnosis
          Data has not been updated in PSA Table
    Please anyone resolve my problem.
    Thanks,
    Sri.

  • GLT0 FIELD DOUBT - URGENT

    hi exports
    i want to take gl account balance GLT0 table?
    but i've some field month wise like HSL01 (apr), HSL02(may), HSL03(jun) like wise? i want to take credit, debit and balance how can i take wht is the prog. i want to take month wise ? how? my parameter company code, year and gl account no?
    pls help me urgent

    HI PRABHU
    IN THAT T.CODE FOLLOWING ERROR OCCURED NO LINE ITEM DISPLAY POSSIBLE FOR ACCOUNT 201207 COMPANY CODE?
    HOW CAN I TAKE

  • BSVZ doubt (Urgent)

    Hi all
    I have created one workflow for solution manager. In that WF i created CHANGED event in SWEC For BUS2000116.
    My. Problem.
        I created a support message, after i want to change the status like (assigned or inprocess) in crmd_order T.code. But Whenever i change the status changed event can't triggured. I also configured in BSVZ for user events.
    anybody help me

    Hi karan
    I checked in SWEL t.code but not triggured. I changed only in status but event not triggered. But if i change any other like message processor or description, WF triggured. But if i change status only WF not started. i check in SWEL.
    I checked in SWETYPV.
    in that,
    Object  type - BUS2000116
    Event - Changed
    Receiver type - WS90000004
    Type linnkage - tick
    status - 0 error
    Why?

Maybe you are looking for

  • HP LaserJet M2727--- Help me!!!

    I am on my third HP LaserJet M2727 in the last 3 months. My first two said Scanner Error 5. Now this one will turn on and work fine but then just shuts off and won\'t work again till the next morning. I\'ve talked to many techs and they said update y

  • My device is not recognised when I connect it to my computer with a USB

    My ancient 4gb ipod nano (2nd gen) is no longer recognised when I connect it to my laptop with a USB.  I have used troubleshooting from the apple support pages to no avail. My ipod charges via USB when it's connected to my laptop but no data seems to

  • Code to undeploy EJB modules only works outside of weblogic

    I have three applications, which we'll call "ejbapp", "deploysa", and "deployear" for reference. The "ejbapp" is just composed of individual EJB modules, using "classloader-structure" elements to put each EJB module in its own ClassLoader (to allow e

  • Opera misses one option bar.

    Since yesterday opera misses the top bar with the menu's(how is that called). The one where it says "File" and "Extra". I have opera installed from the extra repo, but opera-dev from aur has the same problem. I tried removing .opera/ but that doesn't

  • [SOLVED] ttf-ms-win8 installation issues -- font verification failing

    When I try to install the ttf-ms-win8 font package, using fonts I've copied from my Windows 8 installation, the build fails, with the issue being "One or more files did not pass the validity check". The fonts that failed the validity check are "calab