What is "divide sign" in java/

double d = 10 / 3;
the result is 3.0
but i want to get 3.11111.....until the precision is end.
how to implement?

as 10 and 3 are integers, java is doing a integer division, ie truncating decimal places, and then casting the result to a double making it 3.0.
To get the full result either cast the two digits to doubles first ie d = (double)10/(double)3 or put the values to be divided in variables of type double and use those in the division.

Similar Messages

  • Can anybody please tell me what is escapse sign ( check box) external data

    Hi ,
    Can anybody please tell me , What is Escape Sign (check Box) in external data tab in infopackage
    Thanks
    PP

    Hi PP,
    If you are loading data from an Excel CSV file, specify the data separator and the escape character.
    Specify the separator that your file uses to divide the fields in the Data Separator field.
    If the data separator character is a part of the value, the file indicates this by enclosing the value in particular start and end characters. Enter these start and end characters in the Escape Charactersfield.
    Example:
    You chose the; character as the data separator. However, your file contains the value 12;45 for a field. If you set u201C as the escape character, the value in the file must be u201C12;45u201D so that 12;45 is loaded into BI. The complete value that you want to transfer has to be enclosed by the escape characters.
    If the escape characters do not enclose the value but are used within the value, the system interprets the escape characters as a normal part of the value. If you have specified u201C as the escape character, the value 12u201D45 is transferred as 12u201D45 and 12u201D45u201D is transferred as 12u201D45u201D.
    Hope this information helps u.........
    Assigning Points is the way of saying Thanks in SDN
    Regards
    Ramakrishna Kamurthy

  • What does a $ sign mean in a class name

    What does a $ sign mean in a class name? like java/util/HashMap$Entry

    What does a $ sign mean in a class name? like
    java/util/HashMap$EntryIt means it's an inner class.

  • What's the difference between Java SDK and the Enterprise Edition?

    What's the difference between Java SDK and the Enterprise Edition? Are they both free?

    both r free but they are used in diffrent applications. sdk are used for simple apps that run on your computer while j2e (enterprise edition) are ment for large distributed computer systems that include servers and such. if you don't know the diffrence you probably wont need the the j2e, only the sdk.

  • Do I need Java 8 or should i disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    Do I need Java 8 or should I disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    There's no difference. They're both runtime plug-ins (they run when an app calls for Java functions).
    You only need Java if you either have Java apps on your Mac that won't run without having it installed, or you use trusted web sites that require Java to function (getting fewer and far between). Otherwise, you have no need for it at all.

  • What   the   Enviroment  required  for java databases programs?

    Hi guys
    What the enviroment required for java databases programs?
    If I have oracle of version 9i and java 1.4.1 platform
    do I need Jdeveloper platform ?

    What the enviroment required for java databases programs?What do you mean by "environment"?
    f I have oracle of version 9i and java 1.4.1 platformYou just need to download Oracle's 9i JDBC driver (ojdbc14.jar) and put that in your CLASSPATH. Then write JDBC code to connect to Oracle and issue SQL commands.
    do I need Jdeveloper platform ?No, JDeveloper is an IDE. Not required.
    Why Java 1.4.1? We're up to Java 6 now. You're two major versions of the JDK behind.
    %

  • What is wrong in this java code?

    Can someone please tell me what is wrong in this java code?
    /* The program is intended to start animating text at the click of a button, pause it at another click and resume at the next click. It should continue like this */
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TextAnime implements Runnable
    JFrame frame;
    boolean flag;
    Thread animeThread;
    JLabel label;
    String[] textArray;
    public TextAnime()
    flag = false;
    animeThread = new Thread(this);
    frame = new JFrame("Animate Text");
    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints gbc = new GridBagConstraints();
    frame.setLayout(gbl);
    JButton button = new JButton("Start");
    label = new JLabel("Stopped");
    textArray = new String[5];
    String textArray1[] = {"Programmer", "SportsMan", "Genius", "Friend", "Knowledgable"};
    for(int ctr = 0; ctr<5 ; ctr++)
    textArray[ctr] = textArray1[ctr];
    gbc.weightx = 1;
    gbc.gridx = 0;
    gbl.setConstraints(button,gbc);
    frame.getContentPane().add(button);
    ButList bl = new ButList();
    button.addActionListener(bl);
    gbc.gridx = 1;
    gbl.setConstraints(label,gbc);
    frame.getContentPane().add(label);
    frame.setSize(200,150);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
    frame.setVisible(true);
    public class ButList implements ActionListener
    public void actionPerformed(ActionEvent evt)
    if(flag == false)
    flag = true;
    animeStart();
    else
    flag = false;
    //animeStop();
    public synchronized void animeStart()
    animeThread.start();
    Thread newThread;
    newThread = Thread.currentThread();
    newThread.notify();
    public void animeStop()
    animeThread.interrupt();
    public void run()
    int i = 0;
    try
    while(i == i)
    if(i==5)
    i=0;
    label.setText(textArray);
    animeThread.sleep(1000);
    i++;
    if (flag == false)
    animeThread.wait();
    catch(InterruptedException ie)
    label.setText("Stopped");
    public static void main(String args[])
    TextAnime ta = new TextAnime();
    Please tell me if this can be written in a more simpler manner. Also please correct this code. I am tired after trying many times.

    When I fix your error, compile and run it, I get this exception:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException
         at java.lang.Object.notify(Native Method)
         at cruft.TextAnime.animeStart(TextAnime.java:81)
         at cruft.TextAnime$ButList.actionPerformed(TextAnime.java:63)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    %

  • HT202213 I have different id s for my itunes on different laptops, so what do i sign in? with what i use in each ?

    i have different id s for the i tunes in my 2 laptops, so what do i sign to do homesharing?

    Only you can make that decision but there is really no reason to have multiple Apple IDs.

  • What do you think of Java applets?

    What do you recommend for Java applets?

    georgemc wrote:
    DrLaszloJamf wrote:
    sabre150 wrote:
    What do you recommend for Java applets?A dustbin.
    http://forum.java.sun.com/thread.jspa?threadID=764962&start=0&tstart=0
    <drum-roll/>
    <cymbal-crash/>throws ThreadResurrectionExceptionWoops. It takes me a long time to set up my drum kit?
    Actually, I was looking at the OP's Recent Message list to see if his most recent post was related to an earlier one.

  • What exactly is in "BI java" ?

    Hello
    We are trying to understand what is included in "BI java" and what will not work without it. I must say that the technical guide or the official presentation are unclear.
    As of now, we understand that
    - we must run Java in order to use Adobe PDF
    - without Java, broadcast, old and new Bex, web reporting, IGS are working
    So if i don't need PDF, can i go forward without Java ? In that case, where will i be blocked further in the project ? Can i install it afterwards ?
    We would be greatly interested in all your advise on this.
    Regards
    Fabrice

    Hi Fabrice,
    Your first area to check questions like this should be the FAQs in the Service Marketplace:
    <a href="https://service.sap.com/bifaq">https://service.sap.com/bifaq</a>
    Please check also this thread
    <a href="https://forums.sdn.sap.com/thread.jspa?threadID=104198">https://forums.sdn.sap.com/thread.jspa?threadID=104198</a>
    and potentielly search the forum with Java, Portal, BEx Web Setup, etc.
    You find additional information also in the OSS note #917950 and in the Ramp-Up Knowledge Transfer (RKT) material (if you have problems accessing it, please contact your Ramp-Up Coach).
       Cheers
           SAP NetWeaver 2004s Ramp-Up BI Back Office Team

  • What is the role of java in the netweaver platform

    Hi All
    sapnetweaver platform is the integration of the java and abap.then what is the role of java in that netweaver platform
    regards
    Sunil

    Hi Sunil,
            Java makes Sap NetWeaver more powerfull than it was before.
           One of the new additions to the Java functionality of NetWeaver includes the Java Virtual Machine container technology. This will allow standard Java code to run on a framework around the Java Virtual Machine itself. It does this by reducing the number of parallel users per virtual machine. It also improves on the overall memory consumption, the application stability and the number of affected users in the event of a screen freeze, loss of data or the need for re-keying of information.
          The JVM technology also includes several added features designed to assist developers in managing error resolutions. This includes the ability for developers to switch a user process in the production system in or out of debugging mode on the fly allowing for minimum downtime. While also including tracing and monitoring tools for error analysis and hopefully a quick resolution.
             So now, not only does NetWeaver offer support for such standards as HTTP, XML, Web services and of course ABAP, but now it also offers support for Java. All of this adds to SAP’s future interoperability with such applications as Microsoft .NET and IBM WebSphere.
             Now that SAP NetWeaver supports Java we will start to see a real positive impact in the marketplace for those who are in search of a cost-effective means to deploy and manage Java applications in their enterprise and small businesses. For companies of all sizes looking for a way to adapt quickly to market changes, respond to unforeseen challenges and to seize new opportunities, SAP NetWeaver is a tool that is worth looking into.

  • What is web services in Java?

    i have searched Google with the word of "web services".I could only find out some general information about web services but not specific.
    Could you please explain me briefly?

    makpandian wrote:
    It describes about web services in common .I want to know what web service is in java platform..
    Thanking You.That is a slightly odd question.
    There's nothing special about web services in Java against web services in any other language...there are, after all, several web service frameworks in Java, so it's not as if there's even a single answer to it.
    Do you understand what a web service is and the associated standards around one? If you do then you should realise that your question doesn't make much sense...unless you're actually asking what ws packages there are around.

  • What is twin sign? what kick off (in implementation project)

    what is twin sign? what kick off (in implementation project)
    regards
    ramana

    Hi,
    Twin Sign means Both the CLIENT and the COMPANY(IMPLEMENTING) signing on the Project papers by defining various project related things.
    Once it is signed the Project Will KICK OFF means literally starts,
    With the required resources, software and hardware.
    Regards,
    Anji

  • What is the necessacity  of Java in SAP

    What is the necessacity of Java (J2ee engine) in SAP 4.7 ee and above if there is invocation of Http:// is there with help of  RFC to connect NON-SAP systems.

    Hey,
    In terms of XI usage of j2ee engine
    Java Stack:
    -Adapter Engine (AE)
    -Integration Builder, SLD, RWB
    -Standard Mapping
    -Java Mapping
    -XSLT Mapping
    -CPA cache .
    In terms of SAP 4.7 EE check this
    J2EE Technology in SAP Web Application Server
    http://help.sap.com/saphelp_47x200/helpdata/en/13/a3bb3eff62847ae10000000a114084/frameset.htm
    <b>Cheers,
    *RAJ*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • Each time I type an apostrophe on pages it comes out as a divide sign and alters any preceding italicised text into meaningless letters and numbers. How do I change this?

    Each time I type an apostrophe on pages it comes out as a divide sign and alters any preceding italicised text into meaningless letters and numbers. How do I change this?

    Does this still happen if you set your font to Lucida Grande?
    Could you use the camera icon here to post a screen shot of how this looks with the meaningless letters and numbers?

Maybe you are looking for