Why is 0, 1 * 3! = 0.3 in Java?

Hello

I was reading this article Top 10 Tricky Java interview questions and answers | Java67 when I fall on this issue, of why 0,1 * 3! = 0.3 in Java? Unfortunately, the answer isn't here? I tried that in the Java code and it's true, but I'm interested about the real reason.

Thank you

So, if I understand it, the problem was due to 0.3 cannot be represented exactly? right?

No - 0.1 is DECIMAL, and as I showed you, IT cannot be represented exactly as a number BINARY regardless of how many numbers you use.

How do you find these numbers?

It's the SAME for any base. If the value is NOT an exact multiple of the base, then it cannot be represented accurately. It IS a multiple, then it can.

DECIMAL is base 10. A number like 1/9 cannot be represented because it becomes 0.11111... where THOSE continues indefinitely.

You are usually NOT necessary "to find such figures. Most business work (with the exception of the scientific fields) have a limit to the number of decimal digits they need to keep. If the values they use are usually rounded to the number of digits. They lost precision, but the number that results CAN BE compared to other values that have been treated in the same way.

as in the example above, can I assume that 0.1 to 0.2 are fairly represented, i.e. 0.1 is 0.1?

You need to REREAD my response and the example I provided.

I SHOWED I YOU that the decimal value 0,1 is NOT precisely represented in binary.

Thus ONE divided by TEN in base two becomes ' 0.00011001100110011001100110011001100110011001100110011...

See who? The "0011" series continues to repeat FOREVER. This Wiki link tells you the "double size" real - it can store a MAXIMUM of 52 bits for the fraction.

If the first 52 bits are then values compare also - otherwise, they will not. Since the same 52 bits than 0.1 0.1 they will compare also as double.


Sorry, if I miss the point but this floating point comparison does look tricky to me.

IT'S COMPLICATED! But it is not limited to the binary values - the same problem exists for ANY same decimal (base 10).

If you have a formula like 1/9 * 9' the result you get depends on the order you do the operations as well as the type of data you do them in.

Even in decimal "1/9 ' becomes ' 0.11111111111', where these 1 to repeat forever. '" NOTHING in a computer repeats forever. So no matter where you stop it yo going to LOSS of PRECISION.

Let's say you decide to use only FIVE digits of precision. The value would then become "0.11111. If you multiply now that by NINE you get '0,99999 '.

NOTE: you do NOT receive ONE! You can round the value 1 if you want to.

If you rearrange the formula to become '(9 * 1) / 9)', you will get "' 9/9 which IS ONE without rounding."

When you work with fractions, and division, you know these things and make sure that your formulas and calculation order are made correctly for the data types you use.

Tags: Java

Similar Questions

  • Why Firefox always tell me that it blocks Java Deployment Toolkit after that I did the update?

    On the page Web 'Mozilla - check your Plugins', I was told that the 'Java Deployment Toolkit' was vulnerable. So I did the update. But then, I got the same problem still. Why? And should I care?

    Please see the attached screenshot.

    The most funny thing is... I visited two sites that use Java, being Java.com, but I haven't seen the black banner of the blocking message.

    The Java Deployment Toolkit can be the most recent version, but Oracle has not yet fixed the vulnerabilities with this plugin; so Mozilla still there on the red list and point require the user to use "Request enable" to deactivate it. A 'soft-block' - can be used if needed, but needs user by implementing action.

    More specifically, do you have a program on your PC that is really needed as Deployment Toolkit?
    Or is your concern that simply that it is disabled after update of Java?

    Very few applications consumer even uses this Deployment Toolkit, aimed at people who develop Java applications or applications such as the various Oracle programs in the workplace.

    Back to before Oracle acquired Sun Java systems in 2010, this Deployment Toolkit has not been installed with the runtime environment Java for users. Java developers needed to install a separate developers Toolbox for this Plugin - had the SDK program.

  • Why FireFox 11 can't see newly installed Java 1.6.0_31 on Mac?

    I used the software update on my OSX Lion Mac upgrade to Java 1.6.0_31 - b04-413. The update showed as much success and this is the version specified in the Java preferences utility. I then rebooted and you've restarted Firefox several times, but Firefox ' topic: plugins shows a stale version (14.2.0) and and applet versions 1.1.3 1.2.2 1.5, 1.3 1.3.1, 1.1.2 1.1, 1.6 1.2.1, 1.4.2 1.4, 1.2 1.1.1 and a version of YPI 1.6.0_29 cmdlet. Updated plugins check also shows that I do not use the current version and tells me to upgrade to 1.6.0_31, what I have done. I tried to rebuild the base of plugins Firefox and that did not solve it. Any thoughts on how to get Firefox to see and use the updated Java on my Mac?

    See the reply by saneman here - it worked for me
    https://support.Mozilla.org/questions/924590#answer-324377

  • How to activate a blocked addon or Plugin to view the Web site and content the same as IE

    I use a Java Plugin to run a java applet used to my work. Google Chrome has been recently supported by this plugin, I have clients who are unable to work in Internet Explorer and would like to offer them an alternative.

    I can only do so if all the features of my site works in Firefox. Currently, there are a few display issues experienced in Chrome and Firefox with the site. Only IE it appears correctly.

    Should this site Web the Java Deployment Toolkit plugin?
    Or just the main Java plugin?

    If the first, the best you can do is to tell your users to use 'ask to activate' for the plugin. Oracle has never corrected the flaws of Security reported with this plugin of deployment for a couple of years now; Firefox will not allow him to activate automatically when the user has even the latest, updated version of Java installed.

    Here are a few items of support that might help you a little.
    https://support.Mozilla.org/en-us/KB/how-allow-Java-trusted-sites
    https://support.Mozilla.org/en-us/KB/why-do-i-have-click-Activate-plugins

    Java is basically dead for all purposes useful otherwise than for Oracle applications. And Oracle work better on their own web browser for all platforms or Oracle business applications will appear on the tombstone with Java. I'm curious what will be their joint epitaph.

  • Disabling Javascript for individual Web sites

    I've finally isolated the source of unblockable ads that appear on some Web sites, but not others. These ads come from different sources, but many of them are Chitka ads that block a portion of the screen and can not yet be clicked OFF. They block just constantly that you are trying to read or see.

    When I disable Java on Firefox, fully - these ads disappear. Unfortunately, many other sites I visit use Java. So I was wondering, ' Why can't we control what websites display Java and those who do not - as well as the blocking of pop-up windows from certain Web sites and allowing them from others?

    The only work around I have found, is to open TWO browsers: Firefox with Java disabled to view sites that have annoying ads and Internet Explorer with Java enabled to view sites that require Java and have no annoying popups.

    Am I the only one having this problem?

    The NoScript extension is great, but you must be committed to the principle of minimal script because sites increasingly expect access to several areas. In other words, you don't just approve facebook.com, but several other areas, including their areas of content distribution network. And there is no way for the extension to inform you in advance which ones is critical functions, those that are just ads, etc.. So you can end up reloading the page several times until you get exactly the way you like it. Of course, if it is a site on which you plan to spend a lot of time, it is worth. As I say to my colleagues, "what ads?

    http://noscript.NET/

  • Java problem I guess.

    I am playing games on pogo and the game will start to download, but just that the game will open the window closes, I have read some of the other guestions and tried a few of the published information, but it still does not.  I just got this computer and it is something that I've never had a problem with the front so don't know what to do.

    Hello

    ·        Why do you assume that it is a Java problem? You get the error message?

    ·        What operating system do you use?

    ·        What version of Internet Explorer you are using?

     

    Step 1:

    Older versions of Java may cause accidents and crashes when displaying pages that load Java Applets. This is caused by the architectural changes of IE8 to IE7. To resolve this problem, install the update of Java 6 11 or higher.

    Install Java in Internet Explorer

    http://Windows.Microsoft.com/en-us/Windows7/install-Java-in-Internet-Explorer

     

    Note: Before installing Java, uninstall all previous versions that are present in the system, and then install it.

    To uninstall Java from windows 7, follow the steps mentioned below.

    a. click on Start menu and type programs and features in the start search box and press ENTER.

    b. look for Java in the list and right click and click on uninstall.

     

    Step 2:

    I suggest to optimize Internet Explorer, then try to play the game and see if the problem is resolved.

    How to optimize Internet Explorer

    http://support.Microsoft.com/kb/936213

    Step 3:

    Check if you have the latest version of flash installed on the system. If this is not the case, download Adobe on the system from the link below.

    Before installing Adobe flash player on the system, make sure that all previous versions of Adobe flash player uninstalled from the system. Download the utility on the site mentioned below, install it and run it on the system.

    Uninstall Flash Player

    http://kb2.Adobe.com/CPS/141/tn_14157.html

    Once you uninstall Adobe and then try to download Adobe Flash player Adobe website form. Click on the link below.

    http://get.Adobe.com/flashplayer/

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Setup Error 1719 when you try to install updates Windows or Java or something else...

    I use windows Vista home Premium, sp1.  Updates failed to install for several weeks and I couldn't understand why.  But when I tried to update Java I got an error 1719, installation problems error message...  Basically what he said.  I found another post here, where he tells me to do a command from the cmd prompt.  I did this and no change.  This problem started after I installed the trial version of Office 2007 (allows to have a complete pack 3 usr, but it was stolen along with my old computer).  Help, please.  I am very worried because I can not install updates of security on my system and feel my family and business info is at risk!

    Thank you

    Hello

    Try this

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

    and if any;

    Description of the Windows Installer CleanUp utility
    http://support.Microsoft.com/kb/290301

    --------------------------------------------------------------------

    For other updates that Java is there any error codes?

    How to reset the Windows Update components, run the Mr Fixit here as well.
    http://support.Microsoft.com/kb/971058

    --------------------------------------------------------------------

    Use Revo to uninstall Java, so you can reinstall it
    http://www.revouninstaller.com/

    http://www.Java.com/en/

    Rob - bicycle - Mark Twain said it is good.

  • Java question

    In the example on the following piece of code persistentstorage exists. This isn't a class or a function?

    ---------------------------------------

    public static
    {
    Store = PersistentStore.getPersistentObject (0xdec6a67096f833cL);
    synchronized (store)
    {
    If (store.getContents () is nothing)
    {
    store.setContents (new Vector());
    Store.Commit ();
    }
    }
    _data = new Vector();
    _data = store.getContents ((vector));
    }

    -----------------------------------

    When and why it is run?

    Google:

    Java static initializer

  • Open the characteristics of Michael Ferrante on forms 12 c :) and some c omplaints

    I had seen that he's open to talk about new features, but I think that most of the oracle forms is not very well defined, and maybe someone want some comment on that.

    Hello Michale Ferrante I have some questions for you.

    I am a certified oracle developer forms and oracle database and our company has worked with oracle, more than ten years ago.

    (1) the design and the niche in the market that Oracle Forms and the need for advanced graphic features

    I remember a beta version of forms, I think that it was 3.2, it has all the features to move and draw on the screen, and for some oracle of reason which rejected, and I think it was OK under the strategy of a client database, this isn't a software to make the games.

    But as time passes, the customer needs more features visual, I must acknowledge the work of François Degrelle in forms look and feel project .

    Most of the software in large companies are now client server, and they have too many mobile client software and others that requires the features of high graphics, from one screen to buy items, to a customer of entertainment to marketing.

    In the example: you have a restaurant, they want in an ipad, a menu, and you want to do in the form of oracle, here is where oracle has a big hole.

    This includes of course more functions for working with media types, such as audio in the database, video in the database, audio and video from other sources, like youtube, etc.

    (2) the positioning of oracle forms againt other products oracle, oracle should give a clear positioning of all products related to oracle forms and how they incorporate.

    Oracle has proposed new products, such as adf, apex, etc. and is not only my perception, much thought customer oracle forms would be replaced, but they can't because the idea of oracle is an easy tool for development and in theory with more features (it's the reason why you should have to pay more than 20,000 per customer)

    But personally, I see that I do not see BETTER in the product.

    Customers need a clear vision of how the oracle introduces their different tools in example, specifically oracle must decide where is oracle in this net of product development, client of Mr. If you want to develop, forms oracle is why adf this apex for that, for this java, etc. instead of presenting a confusing set of products ,

    Oracle gives messages are confusing, that is the reason why many customers thought oracle forms would be abandoned and they MUST migrate to adf, this message that I saw too much while reading about adf.

    If coupled with additional confusion with previous development of sun products, Oracle must order their ideas and show a structure of the tools in the suite, which is full, which makes sense, instead of "we have all the tools of development of this, study and choose one, and good luck."

    (3) improvement of the editor

    no more comments, just update the form with all editor the Editor doesn't like any other software.

    (4) new and interesting ideas, a real change of attitude of the oracle and oracle reports developer

    I think the additional graphics functionality, clarity in the relationship of forms with other products, and improvements in the editor are obvious.

    then comes something new and interesting forms oracle could present, no necessary to what the current client does, if not for the new procedures, for example a great app for ipads, a generator of models of various boxes,.

    I said something big, because until now, I had seen oracle is a tool of gray, all other tools, delphi, visual studio, adf, etc. has several very interesting improvements, but forms oracle moves like a turtle in this way, as living separated from the jurisdiction of the market development tools.

    It's like a wake-up CALL

    (5) to separate the teams of developing forms and oracle reports.

    The reason is to offer a less expensive product, and because for reports, there are cheapersolutions, plain html pages to free software as reports of jasper.

    It is is important to separate development of oracle reports and forms of the oracle team, he moves to make it really better justify the investment and the reports to be considered as an independent product compatible with other oracle products.

    In example, perhaps you could add as a solution at the apex, not only to print pdf reports.

    (6) the graphical component lost and optional free projects open (requiring the license of oracle forms-based of course)

    graph of Oracle Server customer oracle 6i, has several problems, but in a moment lost, idon't see nowadays too dificult to make a graphic really nice editor, oracle forms could make a free graphics project.

    Oracle Forms should motivate in an organized system, the developer of forms oracle to use and improve open components, it is 1) good items you need and should install 2) the elements of ther o based on ideas, you may find it useful in some way at the same time they develop to become an interesting compoennt and move to the Group 1).

    (7) the albums of other development oracle technologies Integrator

    Oracle Forms, especially for the price, I think that should be the High option and integrate all the other tools of development, it is, you can use free apex or essential to the adf, but if you want more, then purchase a license of the adf, if you want more then buy forms oracle, something like that.

    Think of this form of Oracle idea should be somehow integrated with jheadstart.

    Once you do this, then the oracle development tools will make sense, instead the attitude oracle currently has to "choose all these development tools, we have and good luck."

    In this idea, and then force to buy oracle reports might be a good idea, because it comes to the top of every thing, the best more than adf and apex, java, etc.

    (8) specialists in the oracle database

    These are the oracle forms is something important, a client for oracle, so it should support all the features of oracle databas, e this includes the posibility

    software sincronize with versions of oracle database,

    return of flame, etc. should be part of counter, create environments to test and restore the backups.

    It's don't forget Oracle their first venture is the database and their tools should complement technologies in the database.

    (9) the new age of basic developed compoements

    Anyone who wants to start a business must program all the fundamentals, it's exhange management, user management, etc..

    I've suggested previously to oracle is to create a software base (database, developer and reports), free, so you can take them and start over, this should include basci funcions to manage basic safety features such as creating a user, the user of the monitor, etc basic functionality for enterprise software, etc., clob, number, date.

    It is doing something no one had done.

    hope to be useful

    Thank you very much for your comments and dedication to the product.  We appreciate all the ideas and comments.

    I wanted to comment on some things you said.

    "... the need for... advanced graphic features. »

    Years, Oracle Forms had a sister product called Oracle Graphics.  It was a product that gave you the ability to create almost any kind of graphics or graphics that your creative mind could imagine.  However, in my opinion, it was very difficult and tedious to use.  For various reasons, Oracle has decided to stop manufacturing and chart support a long time ago.  I suspect part of the reason for the abandonment of the product was that with today's web deployed forms, add your own graphics features are easy enough using Java Beans or even product Oracle BI-haricots.

    "... "This includes of course more functions to work with media types... »

    We are planning to add that support in future versions of some media.  Exactly what version or what types of media is yet to be determined.  Development is currently studying the best approach for implementing such features.  But as for tracing, add your own support via a Java Bean is simple enough and for people who are not very well informed in Java, there are many free examples available on the Internet.  This example should provide an excellent starting point.

    "... Client of Mr. If you want to develop, oracle forms is present, adf to do this, apex to do this, for that, etc. instead of presenting a confusing the value of products, java... »

    If you read a part, documentation each product (General presentation documents), you will see that, at a high level already do.  Explain us what the product, how it works, some of his strengths, etc.  However, it would be impossible for any vendor to tell you exactly which tool you use for your specific job.  We/they can offer an opinion, but exactly what you're using, it's a decision that you must make based on several factors.  For example, you talked about a restaurant.  You can build an application that is used to take orders in the forms or ADF.  Either will do the job.  In most cases, which will make you choose one over the other is the skill value available to accomplish the task.  If your organization does not have a single Java developer, but it has several pl/sql developers, then choosing ADF maybe not the best choice.  In this case, the forms can be the best choice.  Alternatively, you can recycle your existing developers, you can hire new employees who know Java or ADF or hire a third party to help you develop the application in the ADF.  Again, only you can answer these questions.

    It's no different than any other product.  Consider Microsoft Visual Studio.  I can use almost any technology throughout (VB, C++, c#, etc.) to build an application that performs the same tasks.  But if I don't know C++ (for example), why should I choose to use C++ if the application will accomplish the same task in the end?  I'd rather the product know my team.  An exception could be if some other technologies offers a feature not found in the other.  For example, with the ADF, you can easily access on mobile devices.  But even this can be overcome with Forms.  For example with the use of Oracle Partner, AuraPlayerof the product, you can use your existing form request to expose web services to mobile applications without having to change your code to forms.

    In short, we intend to add many new features for future versions of the forms.  Exactly what they will be always plans even though many have already been implemented for the next version.  For some people, the changes we present can be considered to be a much-needed change, and for others, they may feel that the amendments add little value.  It is always difficult to make everyone happy.  I hope that soon (I don't know exactly at what time yet) you will be able to meet up with me at various conferences around the world (Open World, WORLD, DOAG, etc) where I will introduce our new items for the new version of forms.  If all goes well, most of you will appreciate the hard work that Oracle Forms developers have put in updates for the next future releases.  We have a very dedicated team of developers who work on a regular basis to ensure that you can easily upgrade with confidence.

    Thanks again for your comments!

  • How to submit an application JavaFX for MAC App Store?

    I packed my JavaFX application as a standalone application using simple steps of deployment of JavaFX on Mac. Link "packaging an application for Distribution on MAC Java ", is only the last step remaining who described " ""application for mac store", " ". But unfortunately the links which lead us to the help page are redirect to the same page and that the information is not clearly define the steps required to submit a JavaFX app to the mac store.  Why I need XCode to apply for my Java app store? I need go by signature steps once again, as my application already is signed with a valid certificate issued by COMODO?  I can help any link that guide me to present my JavaFX for AppStore MAC app?

    Measures so far, I did-

    Now now to submit a JavaFX for MAC App Store app?

    Oracle are working to produce a sample for the deployment of the Mac App Store.

    Draft set of updated RT-24728 demo how to produce bundle Mac App Store

    The sample is scheduled for the next release of JavaFX (2.2.60) feature.

    You can try to contact the engineer working on the sample to the details of the request.

    Coordinates of the engineer are:

    https://JavaFX-JIRA.Kenai.com/secure/ViewProfile.jspa?name=Ginz

  • Errors in the Java console with jre 6u51 in firefox

    Why do these errors 3 times in the java console? (forms 11.1.1.4)

    Manifest attribute missing permissions for: http://machine:9001/forms/Java/frmall.jar
    Attribute manifest missing Codebase for: http://machine:9001/forms/Java/frmall.jar

    You can watch here:

    Version of JRE 1.7.0_25 & 1.6.0_51 and Impact on Oracle Forms (Doc ID 1563023.1)

    and check this box:

    New attributes of JAR manifest file

    Version JDK introduced 7u25 the permissions and codebase attributes in the JAR manifest file. These attributes are used to verify that the application requires in terms of the correct permissions and is accessible from the correct location. See preventing Repurposing of an Application .

    Developers are encouraged to use at least the new permissions attribute and if possible the codebase attribute as well. In future releases, applications that do not include these protections can be blocked or subjected to additional warning dialog boxes.

    Concerning

  • Repair of Java 7


    Hello

    Can someone help me and solve or at least explain why after the repair of any version of Java 7 under Java Control Panel it gives an error "Application not found".

    Thanks that looked like at least on that, but I solved issue my self

  • Exception when converting to XML persistace bean

    Hello

    AM getting exception while executing the following code, please suggest why I get this exception.
    import java.beans.XMLEncoder;
    import java.io.FileOutputStream;
    import java.io.BufferedOutputStream; 
    
    public class Main6 
    {
         public static void main(String[] args) throws Exception
         { try
         
              
              {
         
          Item bean = new Item();
           bean.setId(new Long(1));
           bean.setItemName("a");
           bean.setItemColor("Red");
           bean.setItemQuantities(new Integer(100));
           XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream("Bean1.xml")));
           encoder.writeObject(bean);
           encoder.close();
              }
              catch (Exception e)
         {
               System.out.println("Exception " + e);
         }
    }
    }
     class Item
    {
         private Long id;
         private String itemName;
         private String itemColor;
         private Integer itemQuantities;
    
         public Long getId() {
         return id;
         }
         public void setId(Long id)
         {
         this.id = id;
         }
    
         public String getItemName() {
           return itemName;
         }
         public void setItemName(String itemName) {
             this.itemName = itemName;
         }
    
         public String getItemColor () 
         {
         return itemColor;
         }
         public void setItemColor(String itemColor)
         {
            this.itemColor = itemColor;
         }
    
         public Integer getItemQuantities() 
         {
              return itemQuantities;
         
         }
         public void setItemQuantities(Integer itemQuantities) {
           this.itemQuantities = itemQuantities;
          
         }
    }
    Result:
    D:\Documents and Settings\ba80123524\Desktop>java Main6
    java.lang.IllegalAccessException: Class sun.reflect.misc.Trampoline can not access a member of class Item with mo
    difiers ""
    Continuing ...
    java.lang.Exception: XMLEncoder: discarding statement XMLEncoder.writeObject(Item);
    Continuing ...
    Thanks in advance

    The class is not public.

  • Equivalent DMBS_SQL.to_refcursor in Oracle 10 g

    Hello


    Is there another way to get results like a refcursor in Oracle 10 g with DBMS_SQL? I have the function the function to generate dynamic query and running with DBMS_SQL. This function is called by the code java to display the result in a report. How can I do this, is it equivalent in Oracle 10 g for the DMBS_SQL.to_refcursor? Help, please.

    Thank you

    ilkinesrefli wrote:
    I know there is no way to convert DBMS_SQL result to refcursor in Oracle 10 g, there is no method to_refcursor for DBMS_SQL, but there must be a solution.

    Why should he? Why add new features if they do reproduce existing functionality.

    >

    odie_63 wrote:

    open myRefCursor for 
    using , , ...
    

    It is impossible to use open... for my query method.

    Why?

    I can use only DBMS_SQL.

    Why?

    I need solution to send java code resultset after performance of DBMS_SQL. I do not know collections, temporary tables or other methods can help me or not.

    Are you certain of collections and temporary tables are possible for you?

    You could fill in as an interim step that will slow down your process and select data here, but that will involve using open impossible anyway.

    If you have a variable number of input to the query variables, there are several possible solutions using native dynamic SQL code described here.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:1669972300346534908

  • Serialization problem

    Hey guys,.

    I'm trying to understand why I get following error: incompatible types found: java.io.Serializable, required: int

    Here's my method and imports CO:

    Import oracle.apps.fnd.common.VersionInfo;
    Import oracle.apps.fnd.framework.webui.OAControllerImpl;
    Import oracle.apps.fnd.framework.webui.OAPageContext;
    Import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    Import oracle.apps.fnd.framework.OAApplicationModule;

    import java.io.Serializable;
    java.lang.String import;

    ' Public Sub processRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processRequest (pageContext, webBean);
    OAApplicationModule am = (OAApplicationModule) pageContext.getRootApplicationModule ();
    String usrname = pageContext.getUserName ();
    [Serializable] params = {usrname};

    int empid = am.invokeMethod("getManagerId",params); He does not here

    Integer pers_id = new Integer (empid);
    String personid = pers_id.toString ();
    [Serializable] parameters = {personid};
    am.invokeMethod ("initDetails", parameters);
    }

    Here's my AM method:

    public int getManagerId (String usrname)
    {
    int id;
    ResultSet resultset = null;
    Try
    {
    Conn Connection is getOADBTransaction () .getJdbcConnection ();.
    String query = "SELECT EMPLOYEE_NUMBER FROM XXPER_PO_EMPLOYEE_DETAILS_V WHERE ORACLE_USERNAME = '" + usrname + "'";
    PreparedStatement stmt = conn.prepareStatement (query);
    ResultSet = stmt.executeQuery ();
    ID = (int) resultset.getInt ("EMPLOYEE_NUMBER");
    }
    catch (System.Exception e)
    {}

    return the id;
    }


    Thank you

    Published by: 940793 on June 29, 2012 09:04

    Change:

    public int getManagerId(String usrname)
    {
    return id;
    }
    

    TO:

    public String getManagerId(String usrname)
    {
    return ""+id;
    }
    

    Change:

    int empid = am.invokeMethod("getManagerId",params);
    

    TO:

    int empid = Integer.parseInt((String)am.invokeMethod("getManagerId",params));
    

Maybe you are looking for

  • error 4450? 4251 error? Can't burn CDs problems even under 76minutes? Why?

    before I could easily burn CD UNTIL I did the series of updates. lately have sporadic success if my playlist is less than 74minutes. I have 10 windows and you want to know if it's the fault of APPLE or windows 10 or my computer? passed verbatim to me

  • How to identify the approved modules?

    Are all the Add-ons at https://addons.mozilla.org/en-US/firefox/ are approved? FAQ (https://addons.mozilla.org/en-US/faq) says that the unlicensed modules are clearly identified. "...(Are add-ons safe to install?) Unless clearly marked otherwise, add

  • Pavilion G6-1d98dx: BIOS administrator password

  • CANopen nodes

    I talk with a few Parker SSD drives using CANopen.  When I was talking only to a single player (690 +), I was able to do everything with PDP and everything worked fine.  Using PDO I could start to LABView, then turn on the player and the program woul

  • Compaq mini 110 c-1010ET: System

    Hello don't boot up my laptop. Do the writing on the screen: Enter the CURRENT password: X Enter the CURRENT password: X Enter the CURRENT password: X Password check failed Fatal error... System stopped. CNU9303QB4 Thank you