Powered by Blogger.

Java Code | Definition of Homogeneous Collection in Java Program

Definition of Homogeneous Collection:-

Homogeneous collection is the collection of objects that have a common class.

 Example of Homogeneous Collection:-

 public class TestHomogeneous{
   public static void main(String[]args){
      TestHomogeneous[] arr = new TestHomogeneous[3];
      arr[0] = new TestHomogeneous();
      arr[1] = new TestHomogeneous();
      arr[2] = new TestHomogeneous();
   }
 }


Homogeneous Collection:-

1. A collection of objects with the same dynamic type. Arrays are the most common homogeneous collection objects. See heterogeneous collection.

2. Browse Related Terms: array, autoboxing, base type, casting, dynamic type, heterogeneous collection, main method, return type.

Homogeneous Collection Programs:-

 class Man{
    public void fly(){
    System.out.print(DIP);
  }
 }
 public class A{
    public static void main(String[]args){
       Man[] arr = new Man[3];
       arr[0] = new Man();
       arr[1] = new Man();
       arr[2] = new Man();
   }
 }

2 comments:

  1. Pretty good post. I just came across your site and wanted to say that I’ve really enjoyed reading your posts. In any case I’ll be subscribing to your feed and I hope you will keep a good work!Cheer!

    sap online training
    software online training
    sap sd online training
    hadoop online training
    sap-crm-online-training

    ReplyDelete
  2. This is one awesome blog article. Much thanks again.
    I really enjoy the blog.Much thanks again. Really Great.


    oracle online training
    sap fico online training
    dotnet online training
    qa-qtp-software-testing-training-tutorial

    ReplyDelete