Long.parselong (string s) where s must be a string in the form of a number in order to use the function to convert to a long integer.

Source: Internet
Author: User

1  Public classConverto2     3{ Public Static voidmain (String [] args)4{String Numberin =args[0];5 Convertnum (Numberin);6         }7         Static voidconvertnum (String num)8            {9               LongShownumber;Ten String temp; One                 Switch(num) A{ Case"One": -                  temp = "1"; -Shownumber = Long.parselong (temp); theSystem.out.println (num+ "Convert to" +shownumber); -                    Break; -                   Case"Both": -temp = "2"; +Shownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber); +                    Break; A                   Case"Three": attemp = "3"; -Shownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber); -                    Break; -                   Case"Four": -temp = "4"; inShownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber); to                    Break; +                   Case"Five": -temp = "5"; theShownumber =Long.parselong (temp); *System.out.println (num+ "Convert to" +shownumber); $                    Break;Panax Notoginseng                   Case"Six": -temp = "6"; theShownumber =Long.parselong (temp); +System.out.println (num+ "Convert to" +shownumber); A                    Break; the                   Case"Seven": +temp = "7"; -Shownumber =Long.parselong (temp); $System.out.println (num+ "Convert to" +shownumber); $                    Break; -                   Case"Eight": -temp = "8"; theShownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber);Wuyi                    Break; the                   Case"Nine": -temp = "9"; WuShownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber); About                    Break; $                   Case"Ten": -temp = "10"; -Shownumber =Long.parselong (temp); -System.out.println (num+ "Convert to" +shownumber); A                    Break; +  the                  } -  $             } the  the}

Long.parselong (string s) where s must be a string in the form of a number in order to use the function to convert to a long integer.

Long.parselong (string s) where s must be a string in the form of a number in order to use the function to convert to a long integer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.