Netbeans and Java

5 pts.
Tags:
Java
Java programming
NetBeans
NetBeans 6.x
i hv written this prog in netbeans n i m new to java so not getting error public class Main {         /** Creates a new instance of Main */     public Main() {     }         /**      * @param args the command line arguments      */     public static void main(String[] args)     {         // TODO code application logic here         String m = args[0];         int l=args.length;         int count;         count=0;         String[] n = new String(args.length-1);                     for(int i=1;i<=l;i++)         {                 n[I-1]=args;         }                                for(int i=1;i<=l;i++)         {                 if(n.equals(m))                     count=count+1;                         }         if (count>0)             System.out.println("name "+m+" persent in the list"+ count+"times");         else             System.out.println("name "+m+" not persent in the list");                                             }                     }     } i can see red line error in  String[] n = new String(args.length-1); plz guide me wats the problem
ASKED: September 16, 2011  7:18 AM
UPDATED: March 31, 2012  4:20 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following