Long variable can not hold 20030414153045

I have the following code
long trackNo = 20030414153045
but the compiler keeps giving me error message:
integer number too large: 20030414156060
but the maximum value for long should be greater than this,
I am really confused, help please.

Integer constants are of type "int" by default. Your number is too big to fit in an int, so you need to explicitely state that it is of type long:
long trackNo = 20030414153045L;

Similar Messages

  • HT5661 i bought a second hand phone and now can not hold of the seller,  how can i get the phone activated in my name now?

    Hi all,  I have bought a second hand iphone 5s and have found it is still activated to the last user... i can't get hold of them anymore,  how can i get the phone activated in my name?

    If iOs 7 is installed on that iPhone, you will not be able to activate it without
    the requested information. It is called Activation Lock and is a security
    feature built into iOS 7. There is no workaround.

  • HttpSession can not hold Element

    Hi there,
    I use the HttpSession to hold some data (DOM Element) in memory. Here is the code:
    session.setAttribute("MyDOM", element); //the element is not null
    in another place:
    HttpSession session = request.getSession();
    Enumeration er = session.getAttributeNames();
    while (er.hasMoreElements())
    System.out.print(er.nextElement().toString()+",");
    Element root = (Element) session.getAttribute("MyDOM");
    Through the prints out, I verified that MyDOM is in the session. However, the root Element, which get from the session, is always null.
    What is the problem here?
    Thanks!

    When you put an object into the HttpSession you don't actually put the "physical" object but a reference to the object. If the object is changed outside of the HttpSession then this will be reflected when you retrieve the object reference from the session.
    Not knowing the specifics but if you put the reference to the DOM element in the session then close the DOM then the element goes away and the reference points to null.

  • Error on compile - non-static variable can not be referencedfrom static con

    Error on compile happening with addButton?
    Thanks
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JFrame;
    public class Log implements ActionListener {
    JButton addButton;
    public static void addComponentsToPane(Container pane) {
    pane.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
         c.gridy = 3;
    c.gridx = 0;
         JLabel callsignLabel= new JLabel("Callsign");
    pane.add(callsignLabel, c);
         c.gridy = 3;
    c.gridx = 1;
         JLabel nameLabel= new JLabel("Name");
    pane.add(nameLabel, c);
         c.gridy = 3;
    c.gridx = 2;
         JLabel timeLabel= new JLabel("Time");
    pane.add(timeLabel, c);
         c.gridy = 3;
    c.gridx = 3;
         JLabel dateLabel= new JLabel("Date");
    pane.add(dateLabel, c);
         c.gridy = 3;
    c.gridx = 4;
         JLabel frequencyLabel= new JLabel("Freq ");
    pane.add(frequencyLabel, c);
         c.gridy = 3;
    c.gridx = 5;
         JLabel locationLabel = new JLabel("Country/State");
    pane.add(locationLabel, c);
    c.gridy = 5;
    c.gridx = 0;
         addButton = new JButton("Add");
    pane.add(addButton, c);
         addButton.addActionListener(this);

    Thank you for the reply
    I am new to Java
    What is wrong with the way it is coded?The error message tells you what's wrong: You're trying to reference a non-static variable from a static context.
    If you don't know what that means, then click the link I provided and look at the results from that google search. You might have to go through a few before you find a satisfactory explanation. And after you've done that, if you have specific questions about things you didn't understand there, please post again.

  • Please, help .. return not working. string can not be resolved to a variabl

    Greetings..
    I am writing a Java code that encrypt a String using DES. After encryption, I want to return the String, but I get error that says: variable can not be resolved. Please, help me to find out what is the problem ?? Thanks in advance.
    Here is the code:
    import javax.crypto.*;
    import java.security.*;
    public class Client {
         public String DESEncrypt(String cardnum)
              try{
              //create cipher object for DES
              Cipher c=Cipher.getInstance("DES");
              // craete the symmetric key for DES
              KeyGenerator kg=KeyGenerator.getInstance("DES");
              Key key=kg.generateKey();
              // DO the ecryption steps then display the result
              c.init(Cipher.ENCRYPT_MODE, key);
              //Dofinal accepts byts only. Thats why we use getbytes method.
              byte[] cardNoBytes=cardnum.getBytes("UTF8");
              //get the encrypted bytes
              byte[] encryptedCardNoBytes=c.doFinal(cardNoBytes);
              //convert bytes to string
              String cardNoString=new String(encryptedCardNoBytes);
              } catch(Exception e){ System.out.print("Error");
              return cardNoString;
         } //end the DESEncrypt method
    public static void main (String[] args) {
    try{
         Client cl=new Client();
         String x2=cl.DESEncrypt("123");
         System.out.println("The Encrypted text using DES is: " + x2+'\n');
    } catch(Exception e){ System.out.print("Error");
    }//end main
    }

    Next time, paste in the exact, complete error message and indicate clearly exactly which line is causing it.
    Your problem is that you declare cardNoString inside the try block, but you try to return it outside. Local variables only exist in the narrowest block in which they're declared. Once you exit try, that variable does not exist.
    You also have a logical problem. If an error occurs, you're just printing out :"Error", but you're not actually handling it. You're going on as if everything is fine. Catching an exception doesn't fix the error. If you can't fix it, don't catch it.
    What do you think your method will return if an exception occurs before you set cardNoString? What do you think it will do to the caller to have some arbitrary, meaningless value returned when he thinks everything went fine and he got a valid result?

  • IPhone4 will not hold a charge - This is my 3rd iPhone having this problem

    Hi all -
    I appreciate any help you can provide as I'm stuck and don't know what else to do.
    Last September just before the iPhone4S was released, I purchased my very first iPhone which was a iPhone4.
    About 3 months after owning my iPhone, the battery drained really fast.
    I took the phone to the Apple store and they ran a thousands tests. Restores, backups, test for water damage, etc. etc.
    They issued me a "new iPhone4".
    about 4 months after that, the same thing happened to my phone (now my 2nd iPhone4).
    LONG STORY SHORT - we did the same tests, several trips to the Apple store.
    They said that because I plugged my phone in to my car radio, the radio pushed out too many amps and that drianed my battery.
    I denied that and said that wasn't possiable, but OK, my bad. I won't use my iPhone with my car radio.
    so they issued me ANOTHER "new" iPhone4 (now my 3rd & current one).
    THIS TIME I MADE URE TO CHARGE MY PHONE CAREFULLY.
    i've had this phone since July.
    as with my first 2 phones, I've only used the original charger that came with my iPhone and have only plugged it in to the same oulet that my wife uses for her 4s (she has no issues). Here I am 3 months later, and AGAIN my iPhone drains fast and can not hold a charge.
    after being at 100% battery life, I unplug it. Check emails, twitter and espn occasionally and within an hour i'm under 20% battery life.
    Can anyone PLEASE help me? Am I doing something wrong?
    I don't want to restore all my apps and things again. I don't ant a "new" phone. I just ant to keep this phone and have it retain a normal battery cycle.
    PleaseHelp - Thank you

    bring it into Apple for battery diagnostics. 

  • Oracle can not support upto 32 characters table name and field name ?

    hi
    oracle up limitation ?
    create table aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(a char);
    Error
    ORA-00972:identifier too long
    or
    create table a (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa char);
    Error
    ORA-00972:identifier too long
    Oracle can not support upto 32 characters table name and field name ?
    It is true?
    null

    Hello All
    It's been a year after those posts about the limit of identifiers in Oracle Database. Does anybody know what can be done to get rid of that primitive limit? We are developing using Application Servers, Java, generated Code and a very nice object model, in which we can't just use abreviations because of early database age memory shortcomings.
    We are currently using 8i in a very large organization. Is there any chance this version can be configured to allow larger identifiers? Is upgrading to 9i going to solve this problem? Is Oracle Databases really doomed forever because of a 20-year-ago limitation?
    Please, I do like Oracle Databases. I don't want to be flooded with quick answers like "just use 32 character identifiers". I would like to hear a serious solution. Is anybody there still locked in the 8.3 filename paradigm of MS/PC-DOS? Does anybody has to fit an entire Enterprise System in segmented 640Kb of memory? Does anybody has to use monochrome character mode interfaces? Of course not those in the mainstream.
    I also know that other hadrware and software products have lots os limitations. Take Windows 2000. Its command line has a limit of 255 characters! You can't have more than 4GB of memory in a PC! However, one can't expect one mistake to justify others.
    I wish I were very wrong in this respect, and all it should be necessary is to turn on some kind of configuration parameter in 8i to allow us to develop high quality code.
    Thanks for your attention.
    Please, feel free to contact me if you have a solution.
    [email protected]

  • PIXI - Can not stop an initiated phone call

    Hi,
    I was hoping someone here might have some insight in this problem.
    If I have initiated an outgoing phone call via any means I can not terminate the call.
    So if I mistakenly dial a number (or intentional for that matter) there is nothing short of ripping off the cover and pulling the battery that will stop the call.
    I can not find any keypad combination that will end the call, I can not hold the power button for any period of time to stop the call, the screen goes dark as soon as the call has been initiated and does not light up until the connection is made and, frankly, I'd prefer the option to change my mind.
    If anyone can lend me a secret "stop this call now" option I would be extremely thankful.
    Thanks,
    Randy
    Post relates to: Pixi Plus p8wu0 (AT&T)

    No.
    That's why they provide the Find my iPhone service and encourage you to use it.

  • I have an Ipod touch 3rd generation and for some reason its not holding the battery charge is there something i can do to help keep the charge longer

    i have a ipod touch and its not holding its charge I have charged it over night and then used it say for like an hour or two and the battery is drained .is there something I can do tohelp prolong the battery use.

    Try to set it up "as new device" and don't use the latest backup afterwards. Check your setings as well: Apple - Batteries - iPod
    If the problem persits, you may need a new battery.

  • Can not see long text description of a characteristics in portal

    Hi experts,
    I designed two queries via Query designer and published them to portal but I can not see the the long text description of "Name" attribute belongs to 0BPARTNER characteristics.
    One of the queries shows only the last name of partner in portal while it is showing full name and last name in Bex Analyzer. The other query shows only the key value in both portal and Bex Analyzer.
    I want to see long text description in both queries.
    For an additional information, I'm extracting data from CRM 5.00 to BW 7.00
    What will be the reason for this and how can I solve it?
    Can anyone help me for this issue, it's a kind of emergency situation.

    Hi,
    we have the same problem.
    We want to change <b>only</b> in the screen variable the hierarchy text (from default to long\medium text) but even if there's a possibility to do this, really it doesn't happen anything - it' s possible when you start query, in the selection screen inside every the variable there's a command "User Settings" in which manage what you want to see (I put display custom, as text, medium text).
    I try to do this also in query analizer, selecting variable (hierarchy) and enter in this (user setting), changing in display custom as text - medium text, but even if I save this settings, really doesn't happen anything.
    It seems the system isn't sensitive to this selection...
    By now, if someone has an answer, please write us!
    Thanks in advance,
    Alessandra Mirone

  • My batterie doesn't work correctly to my Iphone 5. It should work longer, but it's worse. My battery does not hold a full day without much use.

    It should work longer, but it's worse. My battery does not hold a full day without much use.
    When the new version of ISO6 will come ??? A lot of apps don't work correctly too.... :-(
    I'm a little bit disappointed...

    Sounds like your iPhone is locked to your home carrier.
    See if they offer unlocking and if you qualify. Otherwise,
    there is nothing you can do besides rent/but a cheap
    phone for your month in Argentina.

  • What's the maximum size a varchar2  variable can hold for and NDS Stmnt?

    What's the maximum size a varchar2 variable can hold for and NDS Statement? I read that NDS is good for doing EXECUTE IMMEDIATE on statements that aren't too big. The 10g PL/SQL manual recommends using DBMS_SQL for statements that are too large, but it never gave a limit for what too large was. Does anyone know offhand?

    The limit is the same as the length of varchar2 variable within PL/SQL - that is varchar2(32767).It's not documented, but intermediate concatenation result can hold up to (64k-1) :
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    declare
      part1 varchar2(32767) := rpad('begin null;', 32767);
      part2 varchar2(32767) := lpad('end;',        32767);
    begin
      dbms_output.put_line(length(part1 || ' ' || /*' ' ||*/ part2));
      execute immediate part1 || ' ' || part2;
    end;
    65535
    PL/SQL procedure successfully completed.

  • If the battery in my iphone 4s is not holding it's charge, can i have the battery replaced?

    if the battery in my iphone 4s is not holding it's charge, can i have the battery replaced? is there a warranty on batteries? if not, what is the cost to replace the battery? can that be done at an Apple store?

    If the iPhone remains under warranty and it is determined the battery has a problem, the iPhone will be exchanged under warranty.
    If the iPhone is no longer under warranty and you want the battery replaced by Apple, check this link.
    http://www.apple.com/batteries/replacements.html

  • After I updated the iOS version on 11/23/13, I can not access anymore my Pages. It says it's updating. How long would this take to update?

    After I updated the iOS version on 11/23/13, I can not access anymore my Pages documents. It says it's updating. How long would this take to update?

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
    If there are multiple apps trying to download at once, only one can download at a time and the rest say "Waiting" until it is then their turn. Try this. Double tap the icon of the Waiting app, and it should resume the download.
    How to Solve the Problem of An iPad App Download Stuck on “Waiting”
    http://ipadacademy.com/2012/06/how-to-solve-the-problem-of-an-ipad-app-download- stuck-on-waiting
    How To Get Rid Of Your iPad App Download Frozen Problem
    http://www.sidelineapple.com/how-to-get-rid-of-your-ipad-app-download-frozen-pro blem-and-not-lose-years-of-your-life-video/
    iTunes: How to resume interrupted iTunes Store downloads
    http://support.apple.com/kb/ht1725
    Another thing to try - Turn the iPad Off & then back ON.
    If that doesn't work:
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

  • Just upgrade to Os Maverick, IPhoto app is no longer available, now I can not open my iPhoto Library. Any solutions suggestions?

    Just up graded my iMac to OS X Maverick after saving all file on external drive.
    HELP: Can not open my iPHOTO Library file because previous iPhoto application
                 is no longer available.
                What to do? If I need new application, which is the best ?

    Have you upgraded iPhoto to the current version (9.5.1)?
    Have you failed to allow your previous iPhoto library to be upgraded?
    Have you tried holding the "option" key while opening iPhoto to point to your iPhoto library?

Maybe you are looking for