Sponsored Links


Results 1 to 2 of 2

Thread: execution of programms in java

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    29 execution of programms in java

    Sponsored Links1


    Dear Sir Most of the examples in the handouts do not compile on the command prompt. just a few examples in the start are executed. I have correctly set the path also. in-spite when a run any code it gives many errors. for example in the following code is there any error. iport java.util.*; public class ArrayListTest { public static void main(String [] args){ ArrayList a1=new ArrayList(); Student s1=new Student ("ali", 1); Student s2=new Student ("Saad", 2); Student s3=new Student ("raza", 3); al.add(s2); al.add(s3); if (b==true){ System.out.println("arraylist size::" +size); } else{ int size=al.size(); System.out.println("arraylist size:" +size); } for (int i=0;i

    Sponsored Links

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    Following are the errors in the posted code.



    import java.util.*; /*Correct keyworkd is import */



    public class ArrayListTest

    {

    public static void main(String [] args){

    ArrayList a1=new ArrayList();

    Student s1=new Student ("ali", 1);

    Student s2=new Student ("Saad", 2);

    Student s3=new Student ("raza", 3);

    al.add(s2);

    al.add(s3);

    if (b==true){

    System.out.println("arraylist size::" +size);}

    else{

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Execution of works of a permanent character
    By vustudents in forum Easements Act 1882
    Replies: 0
    Last Post: 05-04-2012, 05:43 PM
  2. Replies: 0
    Last Post: 06-24-2011, 07:42 AM
  3. Replies: 0
    Last Post: 06-23-2011, 11:41 PM
  4. Replies: 1
    Last Post: 04-28-2011, 08:55 PM
  5. Replies: 1
    Last Post: 04-24-2011, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft