Need help RE: "Type Conversion"...

Hi, need some urgen help here...
I had done the following below:
=====
import java.awt.*;
import java.applet.*;
public class Demo extends Applet
     int ivalue = 3;
     double dvalue = 3.9;
     int a1 = dvalue;
     double a2 = ivalue*2;
     public void paint (Graphics g)
          g.drawString ("inum is " + a1, 25,50);
          g.drawString ("dnum is " + a2, 25,75);
=====
I wanted to convert my 'dvalue' to '3' but can't...Why?
(error: possible loss of precision found :double required: int)
How to retify it?
Converting my 'ivalue' to '6.0' is ok.

Listening to Author: angusedison, problem solved!
Second problem, I wanted to calculate the volume of sphere...
=====
import java.awt.*;
import java.applet.*;
public class Sphere extends Applet
     double radius, II, volume;
     public void paint (Graphics g)
          radius = 12.5;
          II = 3.142;
          volume = 4 / 3 * II * radius * radius * radius;
          g.drawString ("Volume is " + volume, 25,50);
=====
& ans from this is "6136.71875", but using my calculator it's "8182.291667" (which is suppose to be the correct answer).
What's the problem & how to solve it???
Do I use Type Conversion too?

Similar Messages

  • Need help with Currency Conversion

    Hello,
    I need to implement currency conversion in our existing classic planning application (11.1.2.1) which was initially set as a multi-currency application but so far we didn’t have the users entering data in their local currencies. We were entering all the values in USD. Now the users will be entering data in their local currencies and we need to convert their local data into USD  for reporting purposes.
    I don’t have much experience with multi-currency applications and so I would really appreciate if the gurus here can guide and help me.
    Our currency dimension has the following three members USD, B, C. Our reporting currency is USD which is the default currency for our application.
    After reading some forum posts and documentation below are the steps I tried but couldn’t get it to work right. Correct me if I am doing something wrong, or in the wrong order or missing something.
    Administration – Manage – Exchange Rates – Create – A_FY13 – Edit – Chose all the options – Average, Ending, BegBalance, Historical, Method – Clicked Next – Chose the Year as FY13 from the drop down (in Show Years) and entered the exchange rates for both B & C – Save.
                          A message was displayed – “Exhange Rate has been saved successfully”. 
    Administration – Manage – Currency Conversions – A_FY13 – Next - Currency - USD, Scenario – Actual, Version Type – Target, Version – Working – Save.
                                  A message was displayed – “Scripts were successfully created”.
    In EAS both the scripts – HspCRtT & A_FY13 were created.
    Edited the A_FY13 script FIXs to only work on year FY13 for one month for testing purposes.
    In workspace edited the Actual scenario to be associated with the A_FY13 exchange rate table.
    In EAS ran the HspCRtT script first followed by ACT_FY13. The scripts completed successfully.
    While pulling data (Level 0 data) in Excel the data is present in “Local” intersection for the accounts I am looking at but when looked at the USD intersection the data is converted right for only one account, for some other accounts there is no data in the intersection and for another account which is a weight account (weight of a product) which doesn’t need to get converted the values got converted. For some reason the conversion isn’t working right for the accounts.
    Are there any steps that I am missing here?  Please let me know your ideas and help me. Any help is appreciated and I will be looking forward for suggestions and ideas.
    Thanks.
    ~ Adella
    P.S ~ I had posted a similar question a couple months earlier but still couldn't really get things to work... and so I am posting it again to get more help. For those who are feeling that they have read this kind of a question earlier from me...please bear with me as I couldn't get my issues resolved and still couldnt get things implemented successfully. Again, I would really appreciate if you could further help me with your ideas and suggestions.

    replied to the old thread
    Regards
    Celvin
    http://www.orahyplabs.com

  • Need help on data Conversion

    Hi Gurus,
    Please help me with process and validations in following conversions.
    Sub Inventory conversion
    Hr Locations conversion.
    I am working on R12 implementation project.
    Thanks in advance.
    GVK.

    Hello,
    In DSV you can change the linked table into a "named query" and then you can do the data type conversion there, like
    SELECT CONVERT(varchar(20), MyIntColumn) AS MyCharColumn
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Need help with XML Conversion

    I have a very large unstructured document that I need to convert to XML. This document once had a structure applied to it but somehow this structure was deleted (not by me). Since the structure was deleted, a fair amount of content has been added to the file.
    Ive been reading through PDF help files and trying to figure out how to solve this problem. I am very new to this so any help or input would really be great.
    So far thoughts on converting to XML are:
    1) Get structure back working in the original file. I do not know if there is a way to transfer the structure Pre-Loss to the new file. I have created a conversion table already that I can use. I have ran the CT and created what seems to be a structured document, but I think I may be missing further steps.
    2) Export the element definitions to an EDD
    3) Convert the EDD to a DTD
    4) Create a template file (not sure how to do this?)
    Finally export to XML. Before I start on this some feedback would be very welcomed. Sorry I am very inexperienced with all of this.

    Hello Frank,
    with the conversion there is a problem concering the graphics/ xrefs.
    after you have created the conversion table and structured your document you now can
    save the document as xml file.
    In the output you then will still have all graphics that are in the document, but the xrefs are missing.
    convert the document via StructureTools > Utilities > Convert Documents to Structured Format.
    In the output you then will have all the xrefs, but the graphics are missing.
    However, it's possible that I'm not up-to-date her as I haven't tried this since quite some time now.
    Point 2 and 3 from your list:
    Normally it's the other way around: You have a DTD and import that as a new EDD file in FrameMaker.
    Also I don't think that there really is a possiblity to export any element definitions from FrameMaker. But I'm happy, if you are able to disabuse me here.
    Template file:
    Any FM file. It just contains the page layout and the character formats etc.
    What you need to do is to add a Structured Application containing all the information on where to find the Template, EDD, DTD and also the read and write rules.
    With FrameMaker there are several Structured Applications delivered, e.g. DITA.
    If you do not have enough experience to create a new structured application without any model, it's best to copy and modify one of these.
    Regards,
    Anna

  • Need help  - payment type selection

    I need some help with this.
    I have 4 different payment types on my registration buy online form. I want to be able to display relevant information depending on which type is selected;
    if cc is selected then display cc input fields then process through payment gateway on submit
    if phone for payment is selected then display phone number and times to call
    if bank transfer is selected then display bank detail
    if paypal is selected then process on paypal on submit.
    Has anyone done this before?
    Any help will be appreciated.

    Hey there, how is your Javascript/jQuery and CSS skills?
    These will need to be implemented so it shows hide content depending on what is chosen.

  • Need help urgently with conversion of tiff images(.odm) to pdf files...

    Hi Friends!!
    Currently we are working on a project which involves conversion of tiff image files to Pdf files. We are able to convert .tif files to .pdf files.(We are using iText libraries for this..)
    But the only problem we are facing is ---
    We have some .odm files which are multipage tiff files. But we are unable to convert them into .pdf files.
    Note:- Please note .odm is a proprietary extension given by Optix Document Management and Workflow Systems. We figured out that .odm works as a collection of .tif images.
    I searched a lot on the net but couldn't find any help, so, if anyone has any idea of how to go about doing this please let me know...
    Please email any suggestions to [email protected]
    Thanks in advance for your help,
    Rita

    I'm afraid I can't help much with your problem, but I think I can offer some advice on how to get better, faster answers here at this forum:
    First, don't flag your question as urgent, even if it is for you. Claiming urgency is very likely to be counter-productive: most forum regulars will simply ignore such messages as rude and selfish attempts to elicit immediate and special attention.
    Besides, unless the Symbionese Liberation Army is about to chase you over the edge of a cliff, your problem probably isn't as urgent as you think. :o)
    Second, don't ask people to reply by private email. Most Forum regulars believe solving problems should be a public, transparent process during which a first try at an answer can and should be corrected if someone more knowledgeable notices that it is incomplete or incorrect. Also, they get some of their reward for being respondents from being seen to be competent and knowledgeable by their peers (not to mention the possibility of collecting some of those precious Duke Dollars).
    Good luck!

  • Need help in currency conversion

    i am doing currency conversion at query level.
    i am getting this error message for the output.
    Diagnosis
    The exchange rate 19.334.782,61- was calculated via the base currency INR. This produced a rate which exceeds the maximum allowed value of 9999.99999.
    System Response
    The processing can not be continued because the calculated rate can not be used.
    Procedure
    Check the conversion rate to the base currency INR and the exchange rate type MA. If the rates are correct, you must agree different conversion factors for the currencies in question (e.g. 100:1 instead of 1:1), so that the resulting conversion rate does not exceed the value 9999.99999.
    Notification Number SG 119
    how do i change that factor from 1:1 to 100:1 , which is mentioned above ?

    Hi,
    thanks for reply.
    But changing in SPRO ->  is just the display option.
    But the issue that is being faced is with the currency conversion in the query.  since the rate for that currecny maintained in tcurr table is a very small value, the conversion is not happening and its displayed as it is in the query output.
    also, we cannot go with the option of changing the ratio in tcurr table for this currency, because there are so many dependent objects and then we have to change some logic for all those to incorporate this rates. and our Basis team has mentioned that changing the ratio will not be done because of this.
    how do i go about?  whether any other methods available?

  • Need help with RAW conversion in 1.5

    Previous tests on RAW conversion have confirmed that Aperture and CI pretty much all in camera settings except white balance. In my previous tests with everything set to pretty much "normal" in camera Aperture's RAW conversion was close but not exact to the camera produced JPG's of the same exact image (camera set to RAW+JPG). I have no way to test but now the same exact images are no where near the same color balance or temperature.
    Does anyone else have this issue with 1.5? What is going on?
    I can post some examples if it would help.

    Hello, rwboyer
    Quote: "[sic with] pretty much all in camera settings
    except white balance. In my previous tests with
    everything set to pretty much "normal" in camera
    Aperture's RAW conversion was close but not exact to
    the camera produced JPG's of the same exact image
    (camera set to RAW+JPG)."
    What are you using as a comparison for the jpegs?
    Comparing a RAW photograph to a jpeg duplicate would
    not look the same under close examination.
    Let's see the examples.
    love & peace,
    victor
    Let me rephrase and provide an example,
    I have the camera set to produce a RAW file and a JPG of the same shot. In Aperture 1.1 the way both file looked side by side in Aperture was close but not identical, the way both files looked exported to JPG were close. After switching to Aperture 1.5 the same exact files look completely different.
    Here is an example exported from Aperture 1.5
    {Moderator note: Links to images were removed. Please only link to images that would be 'family-friendly'.}
    Thanks
    MacBookPro Mac OS X (10.4.6)

  • Need help in lang conversion

    Hi,
       I got  an FM that convert any given lang to czech but i dont know what input should be given to check if i am giving some simples neg words its displaying as same..i need some input with  some special char i dont know how to generate this special char so that i can see it is working can anyone help me plz.
    points wil be rewarded
    ravi

    d

  • Totally frustrated. Need help with type tool in CS2.

    Must start by admitting I'm embarrassed to have to even find myself asking this question. . . But after working with PageMaker since Ver. 2.0 in the early '80s, finally was forced to switch to CS2 when I had to replace my Mac/Intel computer 3 (or was it 4 years ago?). Did so fighting and cursing all the way, and I'm still having trouble typing in Photoshop . . . not just today, but EVERY TIME I sit down to work on a project.
    Most are brochures and display ads, and though friends and colleagues insist my real problem is that I should be setting them up in InDesign, I'm convinced it's easier to work on graphics and text simultaneously in Photoshop.
    My problem is in grabbing text blocks in order to edit them. Occasionally I'm able to highlight the text I need, but usually I keep getting new type layers instead. I know it should not be this difficult, but as soon as I select the text with the cursor, I get a new, empty text box.It doesn't seem to matter if I am in the layers or edit mode.
    I may not be the most technically advanced Adobe user, but I'm not stupid. What the heck am I doing wrong? Can someone please steer me right?

    Try this on for size:
    Type Tool Tips for Photoshop
    Most folks understand how to create text in Photoshop. You select the Type Tool from the Toolbox, or you tap the "T" key on your keyboard. Then, in the Character Palette you set the attributes for font, color, size, etc. A simple click in your document window will mark the spot where you may begin typing unbounded "point" text. Or, you click and drag in your document window to create a paragraph text box. Type out your text, then tap your "Enter" key to commit the text to its new layer.
    It's pretty straightforward, and Photoshop offers a decent set of tools to adjust how your text looks. One hitch that long-timers will tell you about, though: It's generally accepted that Photoshop isn't the best application to be using if you have to have to create a lot of text because it doesn't have all of the adjustment functions necessary to produce large amounts of professional-quality text. Well, the real world being what it is, sometimes, and for some users, Photoshop is the only application they have to work with; might as well make the best of it, right?
    So, once you have text entered onto a layer in your document, how do you then reselect iteither all of it or just a portion and navigate through it easily? What follows will answer some of those questions.
    Note: The keyboard shortcuts that follow assume you are using a Mac. If you're using Windows, substitute the CTRL key for "Command."
    Double-Click on the boxed 'T' thumbnail on the desired Text Layer in the Layers Palette. This will select and highlight all of the text on that layer.
    Then, if you want, you can use some keyboard shortcuts to move the "Blinking Bar" Type Tool cursor through the text.
    Assuming that your text is enclosed in a click-and-dragged out paragraph text box--When all text is highlighted:
    "Home" key will move cursor to the beginning of first line of text.
    "End" key will move cursor to the end of last line of text.When text is NOT highlighted, but cursor is flashing within the text:
    "Home" key moves cursor to the beginning of the line it's in.
    "End" key moves cursor to the end of the line it's in.
    Command + "Home" moves cursor to beginning of first line of text.
    Command + "End" moves cursor to end of the last line of text.
    Shift + "Home" selects text from cursor position to the beginning of the line it's in.
    Shift + "End" selects text from cursor position to the end of the line it's in.
    Shift + Command + "Home" selects text from cursor position to the beginning of the first line of text.
    Shift + Command + "End" selects text from cursor position to the end of the last line of text.Arrow keys can also be used to select text in various ways. When your cursor is flashing within the text:
    Shift + Right Arrow cumulatively selects text one character or space at a time, from cursor position, progressing toward the end of the text.
    Shift + Left Arrow cumulatively selects text one character or space at a time, from cursor position, progressing toward the beginning of the text.
    ⇒ Add the Command key to select whole words at a time, in either direction.
    Shift + Up Arrow selects text from cursor position back to the next line above the cursor.
    Shift + Down arrow selects text from cursor position forward to the next line below the cursor position.
    ⇒ Add the Command key to select text starting from the cursor position, and accumulating either back to the beginning of the first line, or forward to the end of the last line.
    That covers most of what (or more than) you need to know to navigate through and highlight text. There are some other key combos, and now that you have an idea of what to do, I'll let you experiment and discover them on your own.
    Type Tool Visual Indicators
    Keep a close eye on your Type Tool cursor as you move it near to and away from a hunk of text in your document window.
    When you see it as a plain old "I-Bar" cursor⇒
    ⇒...that means that it's ready to select a position within that text, or to select a hunk of that text.
    When you see a "boxed I-Bar" cursor⇒
    ⇒...that means your cursor is outside of the selectable area for the current text, and is ready for you to click (to start right in typing some unbounded point text) or click-n-drag (to create a paragraph text box). This will, of course, create a new text layer.
    How can you get a visual indicator of where that selectable area for current text begins and ends without blindly moving your Type Tool cursor around the text? Double-Click on the "Boxed-T" thumbnail in the Layers Palette. The text for that layer will become highlighted in your document window. See the black area that surrounds the text? That shows you the actual space occupied by the characters. If your Type Tool cursor is inside this area, it will display the plain "I-Bar" cursor. If it's outside of that area, it will display the "Boxed I-Bar" cursor.
    Want to FORCE Photoshop to create a new Type Layer, even though you're seeing the plain I-Bar cursor?
    Hold the SHIFT key, then either click, or click-n-drag out a paragraph text box.
    Info assembled & provided by phosphor.digital.network. Please note that this is a first draft and is not meant to be complete. There may also be some mistakes. Relax...if you point 'em out, I'll fix 'em.

  • I need help with a conversion problem!!!!

    I need to know how to convert a movie I made on Windows Movie Maker to a Quicktime file, so I can view it in iTunes and on the new iPod. If anyone knows, please help me. Thank you.
    Jason

    Jason hello,
    Welcome to the Apple Discussions as you are not running a MAC your question would be best served in the special
    iTunes for windows forum. Click here
    TP

  • Need help for type Comparable

    Hey guys this is my first post thanks for helping!
    Ok these are the codes that I wrote to store Int into the array
    then compare each input with the element of the array and put them in accending order. NOW, I want the very same code to Compare type Integer, Double, and String. But I'm stuck, I'm having trouble changing to type Comparable and the using the compareTo method provide by Java. Here is the privimative type
    import java.io.*;
    import java.util.*;
    public class SortedVectorDriver {
         public static void main(String[] args) throws Exception {
         SortedVectors a = new SortedVectors (5);
         a.getInput();
    import java.io.*;
    import java.util.*;
    public class SortedVectors{
         private int [] Num;//=new int [size] ;;
         private int size,smallest,largest,choice,Number,tempSpot,top;
         final static int increment = 4;
         final static int orSize = 5;     
         private String s;
         private boolean goodData;     
         public SortedVectors (int size) {
              this.size = size;
              Num=new int [this.size] ;
              this.top=0;
              //this.increment = 4;     
         public int getChoice () {
              return choice;          
         public int getNumber () {
              return Number;
         private void callOneTwo () {
              if ( choice == 1 )
                   insert (getNumber());     
              else if ( choice == 2)
                   delete (getNumber());
         private void callOther () {
              if ( choice == 3)
                   smallest ();     
              else if ( choice == 4)
                   largest();
              else if ( choice == 5)
                   clear ();
         private void readChoice () throws IOException {
              int temp=0;
              goodData = false;
              BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
              System.out.print ("Checking Choice : ");     
              s = br.readLine ();
              while ( (!goodData) ) {
                   goodData = true;     
                   try {     
                        this.choice = Integer.parseInt(s);
                   catch (NumberFormatException e) {
                        goodData = false;
                        System.out.print ("PLEASE RE-ENTER CHOICE : ");
                        s = br.readLine();
                        //choice = Integer.parseInt(s);
              System.out.println("Return goodData");
              ///return temp;
         private void readNumber () throws IOException {
              goodData = false;
              BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
              System.out.print ("Checking Number : ");     
              s = br.readLine ();
              while ( (!goodData) ) {
                   goodData = true;     
                   try {     
                        this.Number = Integer.parseInt(s);
                   catch (NumberFormatException a) {
                        goodData = false;
                        System.out.print ("PLEASE RE-ENTER NUMBER : ");
                        s = br.readLine();
              System.out.println("Return goodData");
              //return temps;
         public void getInput() throws IOException{
              this.showMenu();
              System.out.print ("PLEASE ENTER CHOICEa : ");
         //     BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
              readChoice();
                   while (choice != 6 ){
                        if (choice==3 ||choice==4 ||choice==5) {
                   ///          if (this.choice == 6)
                        //          return;
                             this.callOther();     
                             this.showMenu();
                             this.goodData = false;     
                             System.out.print ("PLEASE ENTER CHOICEc : ");
                             readChoice();
                        else if (choice==1 ||choice==2 ) {
                             System.out.print ("Please enter the NUMBER you want to process: ");
                             readNumber();
                             this.callOneTwo();
                             this.print();
                             this.showMenu();
                             this.goodData = false;
                             System.out.print ("PLEASE ENTER CHOICEd : ");
                             readChoice();
              System.out.println ("Bye! Have a nice day");
         public void insert (int Number) {
    //     public void insert ( ) {     
              if (top == 0) {
                   this.Num[0] = Number;
                   top++;     
                   return;
              if (Num[0] >= Number && Num[1]==0) {
                   int temp = Num[0];
                   Num[0] = Number;
                   Num[1] = temp;
                   top++;
                   return;
              if (Num[0] < Number && Num[1]==0){
                   Num[1]=Number;
                   top++;
                   return;
              if (top >=2) {     
                   tempSpot = this.apPos(Number);
                   System.out.println("Inside top >= 2");
                   if (top >= this.Num.length)
                        this.Num = this.copyArray ( this.Num, increment);
                   for (int ii=top; ii > tempSpot; ii--)
                        this.Num[ii] = this.Num[ii-1];
                   this.Num[tempSpot] = Number;
                   top +=1;
                   return ;
              else
                   System.out.println("Out of insert method error");
                   return ;
         private int apPos (int Number) {//find correct box for new number
              int spot = 0;
              if (this.top >= this.Num.length)
                   this.Num = this.copyArray ( this.Num, increment);
              for (int i=0; i<Num.length; i++){
                   if (this.top == 0 )
                        return (spot =0 );
                   else if ( Number <= Num[0])               
                        return spot =0;
                   else if ( Num[i] <= Number && Num[i+1] >= Number )          
                        return spot = i+1;
                   else if ( Num[i] <= Number && Num[i+1] == 0)
                        return (spot = this.top);               
                   else if ( Num[i] > Number && Num[i+1] == 0)                         
                        return spot = i;
              return spot;
         private void print() {
              System.out.println ("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
              System.out.println("Inside of print");
              for (int i=0; i<(this.Num.length);i++)
                   System.out.println ("Element "+i+ "= " + this.Num );
              System.out.println ("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
         public void clear () {
              int tempNum [] = new int [orSize];
              //for (int i=0; i<Num.length;i++)
              //     Num[i]=0;
              Num = tempNum ;
              this.top =0;
              print();
         public int smallest ( ) {
              System.out.println ("@@@@@@@@@@@@@@@@@@@@@@@");
              int smallest=this.Num[0];//assume the first element in the array is the smallest
              if (this.Num[1] ==0)
                   return smallest;
              System.out.println ("Inside of smallest");
              for (int i=1; i<this.top/*(this.Num).length*/; i++){
                   if (this.Num[i] < smallest)
                   smallest = this.Num[i];
                   else if (this.Num[i] > smallest)
                   smallest = smallest;
              this.smallest = smallest;
              System.out.println ("SMALLEST = "+this.smallest);
              System.out.println ("@@@@@@@@@@@@@@@@@@@@@@@");
              return ( smallest);
         public int largest ( ) {
              System.out.println ("~~~~~~~~~~~~~~~~~~~~~~~~~~");          
              System.out.println ("Inside of largest");     
              int largest=Num[0];//assume the first element in the array is the largest          
              if (this.Num[1] ==0)
                   return largest;     
              for (int i=1; i<this.top; i++){
                   if (Num[i] > largest)
                   largest = Num[i];
                   else if (Num[i] < largest)
                   largest = largest;     
              this.largest= largest;
              System.out.println ("LARGEST = "+this.largest);     
              System.out.println ("~~~~~~~~~~~~~~~~~~~~~~~~~~");
              return largest;
         public boolean full (){
              if (this.top >= this.Num[this.Num.length-1]){
                   if (this.top == this.Num[this.Num.length-1]){
                        System.out.println("Array is full");                    
                        return true;
                   else
                   System.out.println("Array is not full");
                   return false;
              else
                   System.out.println("Array is NOT full");
              return false;
         public boolean empty (){
              System.out.println("Top is = "+this.top);
              if ((this.Num[0]!=0)&&(this.Num[this.Num.length-1] ==0)){
                   System.out.println ("The array is not full");
                   return true;
              else if ((this.Num[0]!=0)&&(this.Num[this.Num.length-1] !=0)){
                   System.out.println ("The array is full");
                   return false;
              else if ((this.Num[0]==0)&&(this.Num[this.Num.length-1] ==0)){
                   System.out.println ("The array is empty");
                   return true;
              else if ((top == (this.Num.length - 1))&&(this.Num[0]!=0)){
                   System.out.println ("The array is full");
                   return false;
              else return false;
         public int find (int NumberTobeSearch) {
              int left = 0;
              int right = this.size-1;
              while (left != right-1) {
                   int middle = (right + left)/2;
                   if (this.Num[middle] > NumberTobeSearch){
                        left = left;
                        right = middle;
                        if (this.Num[left] == NumberTobeSearch)
                             return left = this.findCopy(Num,NumberTobeSearch,left);
                        else if ((this.Num[left] != NumberTobeSearch) && (right - left) == 1 )
                             return -1;
                   else if (this.Num[middle] < NumberTobeSearch){     
                        left = middle;
                        right = right;
                        if (this.Num[right] == NumberTobeSearch)
                             return right = this.findCopy(Num,NumberTobeSearch,right);
                        else if (((right - left)== 1) && (this.Num[left] !=NumberTobeSearch )){
                             System.out.println("No Number found");
                             return -1;     
                   else /*if (this.Num[middle] == NumberTobeSearch)*/{
                        System.out.println("Inside third if");     
                        left = middle;
                        right = middle+1;
                        return left = this.findCopy(Num,NumberTobeSearch,left);
              System.out.println ("THE LAST INDEX IS BEFORE EXIT " + left);
              return left;     
         public void delete (int NumberTobeDelete) {
              int tempIndex = this.find (NumberTobeDelete);     
              if ( tempIndex == -1){
                   System.out.println("NO NUMBER FOUND, TRY DELETING ANOTHER");
                   return;
              else if (this.top >= this.Num.length){
                   System.out.println("I'm allocating more space for U");
                   this.Num = this.copyArray ( this.Num, increment);
              int i = 0;
              for (i=tempIndex; i<this.top; i++)
                        this.Num[i] = this.Num[i+1];               
                   top--;//keeping track of top          
         private int findCopy (int [] Num, int Number, int tempIndex){
              for (int i=0; i<tempIndex;i++){
                   if (Num[i] == Number)
                        return i;
              return tempIndex;     
         private int [] copyArray (int [] Num, int howMany){
         System.out.println("----------------------------");
         System.out.println("Inside CopyArray");
         int Bigger [] = new int [Num.length+howMany];
         for (int i=0; i<Num.length; i++)
              Bigger[i] = Num[i];
         Num = Bigger;
         System.out.println("----------------------------");
              return Num;     
         private void showMenu () {
              System.out.println ("********************************");     
              System.out.println ("Please choose the following operation ");
              System.out.println ("Enter 1 for INSERT");
              System.out.println ("Enter 2 for DELETE");
              System.out.println ("Enter 3 for the SMALLEST ");
              System.out.println ("Enter 4 for the LARGEST");
              System.out.println ("Enter 5 to CLEAR ");
              System.out.println ("Enter 6 to EXIT ");     
              System.out.println ("*******************************");          
    ///end of program thank for helping guys

    To sort a List (which includes Vector) of mutually Comparable objects, you can use Collections.sort(List). If that's not what you're trying to do, please post the relevant sections of the code (i.e. not the IO etc) using &#91;code] tags and explain the problem - compiler errors, runtime errors, conceptual problems.

  • Need help about PDF conversion

    I have red words in a text box using publisher. How come the text show up as black after PDF conversion in Adobe?

    Hi,
    I have windows 8. I am using Microsoft publisher 2013. I want to make a postcard. I made a text box and my text in the box are red. Then I click save as to convert to a PDF file. It works. It opens on Adobe but the text in the text box are black and not red. What can I do to retain the original colors?

  • Need help in solving conversion row to columns issue

    Hi friends
    I came across a strange situation/ problem. The problem is in one table say source_metadata
    I have 4 attribute
    matching_Table matching_columns source_table source_col
    OTREDW.PARTY_ALT_ID Src_key rcw Source_key
    OTREDW.PARTY_ALT_ID party_id rcw party_id_org
    otredw.individual SRC_KEY
    otredw.individual name rcw name_org
    otredw.individual name rcw name_mod
    otredw.wage_fact src_key
    otredw.wage_fact wages_tips rcw wage_tips_org
    otredw.wage_fact wages_tips rcw wage_tips_mod
    The matching tables and source table can be matched on src_key/source_key
    I need to fetch the values from the respective tables / columns in one query. I have just faint idea to the solution is use of PIVOT feature.
    The desired OUTPUT is
    PARTY_ID PARTY_ID_ORG Name name_org name_mod wages_tips wages_tips_org wages_tips_mod
    1111111 1111111 James James JamesR 1000 1000 2000
    I hope I have explained what I need. I will appreciate If anyone will be able to show me the way how to resolve this issue.
    Thanks
    Rajesh

    Thanks everone for sending me the answer but I think I am unable to explain my issue.
    The main issue is I am storing the name of the table and name of the corresponding column of the table under different columns of the table. How to fetch the data using a sql from these columns.
    EXAMPLE
    METADATA_TABLE
    table_name Column_name
    OTREDW.PARTY_ALT_ID PARTY_ID
    OTREDW.INDIVIDUAL NAME
    OTREDW.WAGE_FACT WAGES_TIPS
    How to write query to fetch the table_name and column_name from metadata_table and fetch the data from the respective tables mentioned in the table columns?
    I hope I was able to explain the question now.
    Thanks
    Rajesh

  • Need Help in Image Conversion

    Hi all
    I wonder how these image conversion happens when it comes in the point of converting multiple image in to a single TIFF..i am doing it to the extent resulting in the image creation with file size..The Mystery is i dont have any image when i open the TIFF image...can some one guide me how to handle things...

    Hi,
    thanks for reply.
    But changing in SPRO ->  is just the display option.
    But the issue that is being faced is with the currency conversion in the query.  since the rate for that currecny maintained in tcurr table is a very small value, the conversion is not happening and its displayed as it is in the query output.
    also, we cannot go with the option of changing the ratio in tcurr table for this currency, because there are so many dependent objects and then we have to change some logic for all those to incorporate this rates. and our Basis team has mentioned that changing the ratio will not be done because of this.
    how do i go about?  whether any other methods available?

Maybe you are looking for

  • Use of Sender & Receiver Function in Constant Functions

    Hi All, What is the use of "Sender" and "receiver"  function in "Constant Functions"  in graphical mapping. In which scenarios it will be used. Thanks & Regards Venkat Anil

  • Transaction usage report in 4.6B

    Hi, I'm trying to get a transaction usage report of the last 3 months out of 4.6B. Can someone point me in the right direction? This information is easier to get to in 4.7, but I can't find it in 4.6B. Please help. Thanks

  • Question about exporting albums

    All my photos are on an external hard drive. Is there a way to also export album info so that if I import those photos into iphoto on another computer I can import the album info too? I want to do what you can do in iTunes (exporting playlists). Is t

  • Device problems in iTunes

    Hi everyone, im experiencing grave problems with my iPhone. I've connected it up tonight and the laptop that it is registered on no longer recognises it as 'dan's iPhone' which is what it was called when I booted it up, and it has now reverted back t

  • Syncing Audio Files to iCloud

    I have iTunes running on a PC.  In iTunes I have music that I have purchased through iTunes, and also some non-commercial audio files.  These are old radio shows that I purchased on CD and imported directly to iTunes.  They are not something that iTu