5 pts.
 Netbeans and Java
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

Software/Hardware used:
ASKED: September 16, 2011  7:18 AM
UPDATED: March 31, 2012  4:20 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _