Why it gives an error , although the result is correct

Hello everybody,
here is my code, which i wrote in another way,
After th sucessful compiling it gives an error, but the results of execution is ok.
What is wrong?
import java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class ReadFkOut {
     private static double[] ar;
     private static double[] ar1;
     ReadFkOut() {
ar=new double [6];
ar1=new double[6];
          try {
               FileReader file = new FileReader("bambam1.dat");
               BufferedReader buff = new BufferedReader(file);
StreamTokenizer stk=new StreamTokenizer(buff);
stk.eolIsSignificant(false);
stk.parseNumbers();
int lineNumber=0;
stk.nextToken();
while(stk.ttype==stk.TT_NUMBER) {
ar[lineNumber]=(double)stk.nval;
stk.nextToken();
ar1[lineNumber]=(double)stk.nval;
lineNumber++;
               buff.close();
          catch (Exception e) {
               System.out.println("Error - - " );
     public double[] getValues() {
          return ar;
     public double[] getValues1() {
          return ar1;
0.00000000 39.409
5.00000000 39.409
10.0000000 39.409 file bambam1.dat
15.00000000 39.409
20.00000000 39.409
25.0000000 39.409
main coimport java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class Galka {
ReadFkOut rf;
static double [] gallochka;
static double [] gallochka1;
public static void main(String[] args) {
          ReadFkOut rf=new ReadFkOut();
          gallochka=rf.getValues1();
gallochka1=rf.getValues();
System.out.println(gallochka[1]);
System.out.println(gallochka1[1]);

import java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class ReadFkOut {
private static double[] ar;
private static double[] ar1;
ReadFkOut() {
ar=new double [6];
ar1=new double[6];
try {
FileReader file = new FileReader("bambam1.dat");
BufferedReader buff = new BufferedReader(file);
StreamTokenizer stk=new StreamTokenizer(buff);
stk.eolIsSignificant(false);
stk.parseNumbers();
int lineNumber=0;
stk.nextToken();
while(stk.ttype==stk.TT_NUMBER) {
ar[lineNumber]=(double)stk.nval;
stk.nextToken();
ar1[lineNumber]=(double)stk.nval;
lineNumber++;
buff.close();
catch (Exception e) {
System.out.println("Error - - " );
public double[] getValues() {
return ar;
public double[] getValues1() {
return ar1;
0.00000000 39.409
5.00000000 39.409
10.0000000 39.409 file bambam1.dat
15.00000000 39.409
20.00000000 39.409
25.0000000 39.409
main coimport java.io.*;
import java.lang.*;
import java.util.*;
import java.awt.*;
public class Galka {
ReadFkOut rf;
static double [] gallochka;
static double [] gallochka1;
public static void main(String[] args) {
ReadFkOut rf=new ReadFkOut();
gallochka=rf.getValues1();
gallochka1=rf.getValues();
System.out.println(gallochka[1]);
System.out.println(gallochka1[1]);
}The output is
Error --
5.0
39.409

Similar Messages

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • Why does itunes give an error saying " The Iphone cannot be synced. An unknown error occured (-50). Everytime I try to sync my phone?

    Why does itunes give an error saying " The Iphone cannot be synced. An unknown error occured (-50)". Everytime I try to sync my phone? I have another Iphone that syncs with the same itunes account and it's working fine.

    What operating system do you have on your computer?

  • Does Hibernate throw and error if the result set is above a specific #

    Does Hibernate throw and error if the result set is above a specific #
    of records?

    why do you ask?Maybe he hasn't been able to find the bug in his code yet, so he's casting further and further about for more and more esoteric explanations for what he's seeing? ;-)
    (God knows I've been there...)

  • Adobe Acrobat gives an error message "The key file is missing, canceled"

    Hi,
    Adobe Acrobat gives an error message "The key file is missing, canceled" this is a direct translation of the Finnish error message. Acrobat is already re-installed. The operating system is Windows Server 2008 R2, and there is also installed Adobe Reader X.
    BR
    Heikki

    Please let us know do you see this error on every launch of Acrobat?
    Recommended is to have latest version of Acrobat and Reader. i.e. 10.1.8
    Try updating application and then see if you still encounter the error.

  • Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    First, confirm that ActiveX Filtering is configured to allow Flash content:
    https://forums.adobe.com/thread/867968
    Internet Explorer 11 introduces a number of changes both to how the browser identifies itself to remote web servers, and to how it processes JavaScript intended to target behaviors specific to Internet Explorer. Unfortunately, this means that content on some sites will be broken until the content provider changes their site to conform to the new development approach required by modern versions of IE.
    You can try to work around these issues by using Compatibility View:
    http://windows.microsoft.com/en-us/internet-explorer/use-compatibility-view#ie=ie-11
    If that is too inconvenient, using Google Chrome may be a preferable alternative.

  • My apple RIP gives this error message" the application ppRIPe has unexpectedly quit"

    MY APPLE RIP GIVES THIS ERROR MESSAGE" the application ppRIPe has unexpectedly quit"

    Thanks.
    I should have mentioned that I have already done the Resolving Permissions as outline on Apple Support pages, but, I went ahead and did the complete sequence as shown on Dr. Smokes.
    I decided to stop beating a dead horse and did an Erase and Install of 10.2 again since I did not have anything on there yet. So far, everything is working perfectly. I am doing the Software Updates called for one by one to see if any of those caused the problem.
    The only thing I did other than doing all of the updates after the install was to install OS 9.2 for my Classic Environment software and I also installed an HP PSC 1315v All-In-One scanner/printer. I cannot imagine that would have done anything.
    I did have some strange issues with Where in the USA is Carmen Sandiego and The Star Fleet Technical manual so I may stay away from them unless I start in OS 9 if none of the other updates cause any issues.
    Thanks. BTW, How should I rate your answer? I know that it did not solve my problem, but, it is likely that something else I did whacked something.
    I'll update when I know more.

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • How to get the specific error from the result of sectrustevaluate()

    I am using SectrustEvaluate(trust,result) function to test the server certificate against the root ca installed in keychain.
    Result of server certificate validation in case if comes as recoverable faliure how may i know what was the reason which causing it to recoverable failure.
    I want to throw the specific error to UI to know why server certificate evaluation failed.
    No API's available in ios , Some API's are there available in MAC.
    Please Advise.

    If you are on iOS I think you are out of luck.  See red text under kSecTrustResultRecoverableTrustFailure.
    https://developer.apple.com/library/ios/documentation/Security/Reference/certifk eytrustservices/Reference/reference.html#//apple_ref/c/func/SecTrustEvaluate
    The way you handle this depends on the OS.
    In iOS, you should typically refuse the certificate. However, if you are performing signature validation and you know when the message was originally received, you should check again using that date to see if the message was valid when you originally received it.
    In OS X, you can call the SecTrustGetTrustResult function to get more information about the results of the trust evaluation, or the SecTrustGetCssmResult function to get information about the evaluation in a form that can be passed to CSSM functions.

  • Since uploading Maverick, my Microsoft apps give an error message "(the app) quit unexpectedly.  Click Reopen to open the application again."  However, this does nothing but renew this window.  What to do?

    Since uploading Maverick, all of my Microsoft apps give an error message "(name of the app) quit unexpectedly.  Click Reopen to open the application again."  However, this does nothing but renew this window.  I have to click on the "OK" button to get rid of the error message.  What to do?

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • Can you explain why there is an error at the line   *pStart = *pEnd;

    //program should reverse a given string.
    //Original string is "SAW", and the same string reversed should be "WAS"
    #include <stdio.h>
    #import <string.h>
    int main (int argc, const char * argv[]) {
    // insert code here...
    printf("This program reverses a string without blank spaces.\n");
    char *sentenceArray = "SAW";
    char temp;
    char * pStart, *pEnd;
    pStart = sentenceArray;
    int stringLength = strlen(pStart);
    pEnd = (pStart + stringLength -1);
    printf("\nOriginal sentenceString is: %s", pStart);
    printf("\naddress of pStart:%lu, value: %c", pStart, *pStart);//make sure pointer is at the start
    printf("\naddress of pEnd:%lu, value: %c", pEnd, *pEnd);//ensures pointer is at the end
    while (pStart < pEnd)
    temp = *pStart;
    *pStart = *pEnd;//can somebody explain why this is an error? Thank you.
    *pEnd = temp;
    ++pStart;
    --pEnd;
    printf("\nReversed sentenceString is: %s", sentenceArray);
    return 0;
    //Thank you for your assistance!

    To expand on Keith's answer a bit:
    The problem, as you know, is with this line:
    *pStart = *pEnd;
    So, let's break this down a bit. This statement uses the dereference operator (the asterisk before each pointer) twice, and, as you probably know, the dereference operator allows you to access the value that a pointer points to, instead of accessing the value of the pointer itself (a memory address), which is what you would be accessing if you didn't use the dereference operator.
    So, on the right side of the assignment you have *pEnd, which is basically saying to take the value pointed to by the pointer pEnd and assign in to whatever is on the left side of the assignment, and that's where your problem is -- the left side of the assignment. The *pEnd part is fine, but the +*pStart =+ part is not fine. What you are saying here is to take whatever is on the right side of the assignment (*pEnd) and assign it to the value that is pointed to by the pointer pStart. And, as Keith mentioned, that's your problem. The value that is pointed to by pStart is a string literal ("SAW" here), and a string literal (like any literal) can not have anything assigned to it -- it can not be written to -- it is read-only, as Keith said. And like anything else read-only, this means that it can not be on the left side of an assignment statement, and that's where you have it, so, we get an error.
    The solution, as Keith gave, is to change pStart from a character pointer (which is what you have declared it as) to a character array, like so:
    char sentenceArray[32] = "SAW";
    This will fix your problem.
    Hope this helped some. Pointers are rough business, especially when it comes to character pointers and character arrays and whatnot, and I still don't understand them well by any means, so keep at it. Best of luck!

  • Why getting "Run-time error 2046 the command or action 'GoToRecord' isn't available now"

    Hello,
    I'm running this on Form Load:
    Private Sub Form_Load()DoCmd.GoToRecord , , acNewRec
    End Sub
    when I'm in the office connected to the LAN, the database opens without any error but when
    I'm working remote through a VPN, I get this error:
    Run-time error 2046 the command or action 'GoToRecord' isn't available now.
    I'm wondering if this is related to a speed issue and more importantly, how to fix it?
    Thanks,

    Make absolutely sure the query behind the form is updateable and the form allows edits
    Use the following code with the forms On Open event:
    DoCmd.ShowAllRecords
    DoCmd.GoToRecord , , acNewRec
    See if that helps. Have no clue why it would work in one environment but not another.

  • Whatsapp does wanna open it gives an error about the firewall

    Just downloaded the new whatsapp, after putting in my number it gives
    Out a message about whatsapp that it has attempted to open a connection
    Inside the firewall which is not allowed. Then its gives an error about java.lang.securityexception: permission denied..please help cause previously whatsapp was working fine

    The firewall option to disable it or enable it is locked it has a red lock I don't know how to remove it so I can disable the firewall

  • Error in the result while adding

    Hi
    This is a simple program which repeatedly adds a number once you define the step size of the number. Shift register is also being used. suppose if the no. is 9 and the step size is 1 then the result should be 10, but it is not so. what is wrong with the program?
    Attachments:
    Number addition.vi ‏6 KB

    smercurio_fc wrote:
    It really depends on what you're doing. For a loop that is intended to run for a long time you do not want to have the loop steal all of the CPU processing time. Otherwise the user interface and the OS will become unresponsive. There are times, however, when you would not need to put in a delay, such as using a while loop to create a Functional Global Variable, a.k.a. Action Engine. Or, if the loop is intended to only run for a few iterations (and there's a guarantee that it will break out and not become an infinite loop).
    These use cases have now better workarounds in newer LabVIEW versions.
    Use an event structure for the UI loop. Only spin the loop if things change. Never do the same operations on the same inputs more than once unless you expect a different result every time.
    FGVs no longer need loops at all, we can use globally initialized feedback nodes.
    To guarantee that we don't create an infinite while loop, we use a FOR loop with the conditional terminal and wire a reasonable upper iteration limit to N.
    LabVIEW Champion . Do more with less code and in less time .

  • HT201514 Time Machine gives following error message;- The backup disk image "/Volumes/Data/JOE OTOOLE's Computer.sparsebundle" is already in use. What does it mean?

    My normally reliable Time Machine is giving following error message;-
    The backup disk image “/Volumes/Data/JOE OTOOLE’s Computer.sparsebundle” is already in use.
    What does it mean and how do I deal with it?

    I have loaded it into ML using a great and free utility unpkg.. it probably works much the same as Pacifist.
    Locate your downloaded 5.6 dmg file.. click it so you can see the pkg but don't bother opening it.
    Download, install and run unpkg.
    http://www.timdoug.com/unpkg/
    Drag the airport utility 5.6 pkg over to unpkg.. and it will create a new directory on the desktop.. named AirPortUtility56.. drill down to Applications, Utilities and you will find the unpackaged utiity.. drag it to your main utilities directory or just run it where you are..

Maybe you are looking for

  • How do i restore my iPhoto pictures from time machine to my macbook pro?  I just had to change my hard drive and need to add my photos.

    Macbook pro, 17 inch, early 2010.  Hard drive crashed so I put in new ssd hard drive.  Operating system OS X 10.9.4 has been installed.  Now I need to find out how to get my photos from my time machine and restore to my mac book pro??

  • LIV Idoc failure for TM 8.0 Purchase Order - Error # M8_2

    We are using inbound EDI Idocs to post Invoices against TM 8.0 Purchase Orders and have an issue while posting an Invoice for a Bill of Lading that is shared across multiple TM Purchase Orders. We have used the new qualifers required by SAP and are p

  • What port do I have

    I got my iMac at the end of last december. What adapter do I need to connect it to an external VGA display? I believe it is the mini DVI o VGA adapter?? Regards

  • Function in Select...from dual

    Hi One generate question. We can do the following task in the Select Statements:- 1. Select Function_Name('Parameter) from dual; 2. Select Package_Name.Function_Name('Parameter') from dual; Why dont we can call the procedure from the Select Statement

  • Clip is tinted in green with DV pal QT

    Two clips which are colour corrected in FCP appears fully green after exporting to Quicktime as a DV Pal anamorphic file. Same clips appear normal when I export them to a QT movie with the original DVC Pro HD settings. Any ideas what to do ? Thanks.