Chopper Java: what is wrong with this? -


  आयात करें java.util.Scanner; सार्वजनिक श्रेणी के लाइन-क्वेंटर {सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {System.out.print ("पूर्णांक की रेखा प्रविष्ट करें"); स्कैनर हेलीकॉप्टर = पहला स्कैनर (); int x = हेलिकॉप्टर.एक्सआईटी (); जबकि (हेलिकॉप्टर.hasNextInt ()) {System.out.println (हेलिकॉप्टर.एक्सआईटीआईएनटी ()); }}}   

यह मुझे बताता है कि ';' उम्मीद है कि स्कैनर हेलिकॉप्टर से शुरू होने वाली रेखा पर, समस्या क्या हो सकती है?

पीएस क्या आप जानते हैं कि मैं इसे कैसे प्राप्त कर सकता हूं कि कितने पूर्णांक टाइप किए गए हैं?

आपके पास लिखित पहले स्कैनर () के बजाय नया स्कैनर (System.in)

आपको एक इनपुट स्रोत निर्दिष्ट करना होगा, और जब से आप उपयोगकर्ता को इनपुट इनपुट करना चाहते हैं, तो आपको System.in को तर्क के रूप में उपयोग करना चाहिए।

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -