Why can't classes with private constructors be subclassed?

Why can't classes with private constructors be subclassed?
I know specifying a private nullary constructor means you dont want the class to be instantiated or the class is a factory or a singleton pattern. I know the workaround is to just wrap all the methods of the intended superclass, but that just seems less wizardly.
Example:
I really, really want to be able to subclass java.util.Arrays, like so:
package com.tassajara.util;
import java.util.LinkedList;
import java.util.List;
public class Arrays extends java.util.Arrays {
    public static List asList(boolean[] array) {
        List result = new LinkedList();
        for (int i = 0; i < array.length; i++)
            result.add(new Boolean(array));
return result;
public static List asList( char[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Character(array[i]));
return result;
public static List asList( byte[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Byte(array[i]));
return result;
public static List asList( short[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Short(array[i]));
return result;
public static List asList( int[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Integer(array[i]));
return result;
public static List asList( long[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Long(array[i]));
return result;
public static List asList( float[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Float(array[i]));
return result;
public static List asList( double[] array) {
List result = new LinkedList();
for (int i = 0; i < array.length; i++)
result.add(new Double(array[i]));
return result;
// Now that we extend java.util.Arrays this method is not needed.
// /**JCF already does this so just wrap their implementation
// public static List asList(Object[] array) {
// return java.util.Arrays.asList(array);
public static List asList(Object object) {
List result;
Class type = object.getClass().getComponentType();
if (type != null && type.isPrimitive()) {
if (type == Boolean.TYPE)
result = asList((boolean[])object);
else if (type == Character.TYPE)
result = asList(( char[])object);
else if (type == Byte.TYPE)
result = asList(( byte[])object);
else if (type == Short.TYPE)
result = asList(( short[])object);
else if (type == Integer.TYPE)
result = asList(( int[])object);
else if (type == Long.TYPE)
result = asList(( long[])object);
else if (type == Float.TYPE)
result = asList(( float[])object);
else if (type == Double.TYPE)
result = asList(( double[])object);
} else {
result = java.util.Arrays.asList((Object[])object);
return result;
I do not intend to instantiate com.tassajara.util.Arrays as all my methods are static just like java.util.Arrays. You can see where I started to wrap asList(Object[] o). I could continue and wrap all of java.util.Arrays methods, but thats annoying and much less elegant.

Why can't classes with private constructors be
subclassed?Because the subclass can't access the superclass constructor.
I really, really want to be able to subclass
java.util.Arrays, like so:Why? It only contains static methods, so why don't you just create a separate class?
I do not intend to instantiate
com.tassajara.util.Arrays as all my methods are static
just like java.util.Arrays. You can see where I
started to wrap asList(Object[] o). I could continue
and wrap all of java.util.Arrays methods, but thats
annoying and much less elegant.There's no need to duplicate all the methods - just call them when you want to use them.
It really does sound like you're barking up the wrong tree here. I can see no good reason to want to subclass java.util.Arrays. Could you could explain why you want to do that? - perhaps you are misunderstanding static methods.
Precisely as you said, if they didn't want me to
subclass it they would have declared it final.Classes with no non-private constructors are implicitly final.
But they didn't. There has to be a way for an API
developer to indicate that a class is merely not to be
instantiated, and not both uninstantiable and
unextendable.There is - declare it abstract. Since that isn't what was done here, I would assume the writers don't want you to be able to subclass java.util.Arrays

Similar Messages

  • Class with private constructor can be extended or not

    Hi All,
    I have a doubt.
    if a class has private constructor and there are some methods in this class.Can this class be extended and if yes how can we call its method in subclass?
    Thanks
    Sumit

    Karanjit wrote:
    If a class contains only private constructors, then it cannot be extended.Err... not the whole story!
    public class Sabre20090603a
        static class Fred extends Sabre20090603a
            Fred()
                super();
        private Sabre20090603a()
    }

  • Private inner class with private constructor

    I read that if constructor is public then you need a static method to create the object of that class.
    But in the following scenario why I am able to get the object of PrivateStuff whereas it has private constructor.
    I am messing with this concept.
    public class Test {
          public static void main(String[] args) {          
               Test t = new Test();
               PrivateStuff p = t.new PrivateStuff();
          private class PrivateStuff{
               private PrivateStuff(){
                    System.out.println("You stuff is very private");
    }

    A member (class, interface, field, or method) of a reference (class, interface, or array) type or a constructor of a class type is accessible only if the type is accessible and the member or constructor is declared to permit access:
    * Otherwise, if the member or constructor is declared private, then access is permitted if and only if it occurs within the body of the top level class (§7.6) that encloses the declaration of the member or constructor. [Java Language Specification|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.6.1]
    Your main method is within the body of the top level class, so the type (the inner class) and method are accessible.
    eg:
    class ImInTheSameSourceFileAsInnerAccessTest {
        public static void main(String[] args) {          
            InnerAccessTest t = new InnerAccessTest();
            InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    public class InnerAccessTest {
          public static void main(String[] args) {          
               InnerAccessTest t = new InnerAccessTest();
               PrivateStuff p = t.new PrivateStuff();
          private class PrivateStuff{
               private PrivateStuff(){
                    System.out.println("You stuff is very private");
    }Result:
    $ javac -d bin src/InnerAccessTest.java
    src/InnerAccessTest.java:4: InnerAccessTest.PrivateStuff has private access in InnerAccessTest
    InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    ^
    src/InnerAccessTest.java:4: InnerAccessTest.PrivateStuff has private access in InnerAccessTest
    InnerAccessTest.PrivateStuff p = t.new PrivateStuff();
    ^
    2 errors
    Edited by: pm_kirkham on 20-Jan-2009 10:54 added example of 'in the same source file'

  • Final class and private constructor

    Whats the difference in a final class and a class with private constructot?
    If we can make a class non-extendable by just giving private constructor then whats the advantage of final class? (I know final is very useful for many other things but just want to get info in this contaxt)

    You can extend a class with a private constructor,I'm not sure about that. The compiler will complain.
    KajThat depends on the signature of the private constructor.
    If it's the no-arg constructor and you don't declare another constructor which you explicitly call from your derived class you will indeed get an error.
    If however you never call it (and there's no way it can implicitly get called) from a derived class there should be no problem.
    class Private1 {
         private int q;
         private Private1() {
         public Private1(int i) {
              q = i;
         public void print() {
              System.out.println(q);
    public class Public1 extends Private1 {
         public Public1() {
              super(1);
         public static void main(String[] args) {
              new Public1().print();
    }for example compiles and runs perfectly.
    But remove the call "super(1);" from the constructor and it will fail to compile.

  • Initiating variables with private constructor fails

    Goodday all,
    At the moment I'm working on a little class that reads the input from the console screen. The class looks like this (I omitted a few unrelevant methods):
    public class SomeClass {
      private static BufferedReader bin = null;
      // private constructor; another method (not shown here) returns an instance
      private SomeClass() {
        bin = new BufferedReader(new InputStreamReader(System.in));//somehow this doesn't work ??????
      //public method
      public final String readLine(String message) {     
              String feedback = "";
              try {
                   if(bin==null) say("variable bin is null"); //bin is indeed null, just don't know why
                   else feedback = bin.readLine();
              catch (IOException e) {
                   e.printStackTrace();
              return feedback;
    }Executing this code will result in output "variable bin is null". When I try debugging it, I see that the variable bin will remain null when the constructor is called.
    Placing the initiation of 'bin' in another method will make things work, but I want to know why it doesn't work in the constructor. It seems as a fair piece of code ;).

    private static BufferedReader bin = null;Why is it static?
    // private constructor; another method (not shown here) returns an instance
    private SomeClass() {
    bin = new BufferedReader(new InputStreamReader(System.in));//somehow this doesn't work ??????
    }'Somehow it fails?' It doesn't even compile!
    Executing this code will result in output "variable bin is null". When I try debugging it, I see that the variable bin will remain null when the constructor is called.Your constructor doesn't even compile, so I find it hard to believe it ever executed.

  • Default class with public constructor - why?

    Noticed some code that had a class with package-level access and a public constructor - wondered what the benefit/use of that would be... Thanks!

    GarudaJava wrote:
    Noticed some code that had a class with package-level access and a public constructor - wondered what the benefit/use of that would be... Thanks!If the class itself doesn't need to be exposed, but it implements some interface, and is assumed to have a public no-arg consturctor, it could be created reflexively. This is a contrived situation, but it's the only one I can think of in Java where that'd be useful.
    package foo;
    class Foo implements SomeInterface {
      public Foo() {
    package factory;
    class Factory {
      public static SomeInterface create(Class<? extends SomeInterface> clazz) { // not sure if I got the generics right, but they're incidendtal to the example
        return clazz.newInstance();
    package foo;
    import factory.Factory;
    public class Bar {
      public void bar() {
        SomeInterface si = Factory.create(Foo.class);
        si.doStuff();
    }Like I said, pretty contrived, and I can't think of a real-world use case that matches it offhand, but structurally it'd look something like that.
    You could also maybe imagine that the factory package might do more than just create and return an instance. It might create it and use that SomeInterface type for its own ends.

  • Class with no constructors

    The class javax.microedition.rms .RecordStore does not have a constructor. Why?
    Please note that I am not asking how to produce an instance of a RecordStore, I have read the documentation and am aware of the static openRecordStore method.
    Paul Hide

    javax.microedition.rms.RecordStore has no public or protected constructor so you can't extend it.
    If a private constructor is defined in a class then it is not exposed in documentation (usually), but at the other hand if you have not defined any constructor then non-argument public constructor is shown in the documentation.
    So it seems that javax.microedition.rms.RecordStore has private constructor.
    So you can't extend it.
    Following two type of classes are non-extendable:
    - Whose all constructors are made private. E.g. java.lang.Runtime, java.lang.System.
    - Final class (just final keyworkd is added in access specifiers). E.g. java.lang.String
    Following two type of classes are non-instantiable:
    - Whose all constructors are made private. These can be instantiated inside the class. E.g. java.lang.Runtime, java.lang.System
    - Abstract class (just abstract keyword is added in access specifiers). E.g. java.io.OutputStream
    Regards,
    Humayun.

  • Enclosing class calling private constructor of private member class

    Hi all,
    I have this question concerning member classes and privtae constructors.
    public class MyTest {
        private class Inner {
            private Inner() {
                System.out.println("Why Am I here!??");
        public MyTest() {
            Inner a = new Inner();
        public static void main(String[] s) {
            MyTest z = new MyTest();
    }It doesn't work for my JDK SE 1.3.3, build 1.3.1-b24.
    It works for many other versions.
    Can somebody kindly enlighten me, should this code work?
    I really didn't think that it should, but it did!

    I am sorry. It was actually my jikes 1.15 that was causing the problem.
    After some research, I found out that my problem arose out of my understanding of OO concepts, or rather, the meaning of access modifiers in Java.
    I had thought that nobody can access a private variable/method of class except the class itself. Apparently, this is not so. The access modifiers apply to the class themselves and not the object. Thus explaining why an object can access the private variables/methods of another object of the same class.
    Actually, it's not really the case here. The Java language specs states that the inner class has total access to the enclosing class, but I could not find any word on enclosing class access to inner classes in the specs.
    As for Jikes, I really hope they will fix it soon. I like it a lot as it is significantly faster than javac for everything I have done so far.
    cheers!

  • Help: Factory Class using Inner Class and Private Constructor?

    The situation is as follows:
    I want a GamesCollection class that instantiates Game objects by looking up the information needed from a database. I would like to use Game outside of GamesCollection, but only have it instantiated by GamesCollection to ensure the game actually exist. Each Game object is linked to a database record. If a Game object exist, it must also exist in the database. Game objects can never be removed from the database.
    I thought about making the Game object an inner class of GamesCollection, but this means that Game class constructor is still visible outside. So what if I made Game constructor private? Well, now I can't create Game objects without a static method inside Game class (static Object factory).
    Basically what I need is a constructor for the inner Game class accessible to GamesCollection, but not to the rest of the world (including packages). Is there a way to do this?

    leesiulung wrote:
    As a second look, I was initially confused about your first implementation, but it now makes more sense.
    Let me make sure I understand this:
    - the interface is needed to make the class accessible outside the outer classBetter: it is necessary to have a type that is accessible outside of GameCollection -- what else could be the return type of instance?
    - the instance() method is the object factory
    - the private modifier for the inner class is to prevent outside classes to instantiate this objectRight.
    However, is a private inner class accessible in the outer class? Try it and see.
    How does this affect private/public modifiers on inner classes?Take about five minutes and write a few tests. That should answer any questions you may have.
    How do instantiate a GameImpl object? This basically goes back to the first question.Filling out the initial solution:
    public interface Game {
        String method();
    public class GameCollection {
        private static  class GameImpl implements Game {
            public String method() {
                return "GameImpl";
        public Game instance() {
            return new GameImpl();
        public static void main(String[] args) {
            GameCollection app = new GameCollection();
            Game game = app.instance();
            System.out.println(game.method());
    }Even if you were not interested in controlling game creation, defining interfaces for key concepts like Game is always going to be a good idea. Consider how you will write testing code, for example. How will you mock Game?

  • Creating a generic class with a constructor that takes an array of objects

    I am relatively new to java and want to build a quick utility class that can generate a Run Length Encoding of any object. The idea is to take an array of objects of type "O" and then encode a string of objects that are "equal" to each other as an integer that counts the number of such equal instances and a single copy of the instance. This has the potential to very quickly reduce the size of some objects that I want to store. I would like to implement this class as a generic.
    public class RunLengthEncoding<O> {
         private class RLEPair {
              private int length;
              private O object;
         public RunLengthEncoding(O[]) {
    }As you can see, I need to make a constructor that takes an array of type "O". Is this possible to do? I can't seem to find the right syntax for it.
    Thanks,
    Sean

    Sorry. Obvious answer:
    public RunLengthEncoding(O[] oarray) {Again, sorry for the noise.

  • Why Can't I call a constructor?

    Hello all,
    Why cant i call a constructor as a function?, just like any other function by its name?...
    class Test{
         Test(){
        void func(){
             Test();    // why cant i do this?
    To me it looks just like another function. So whats the wrong in calling it as a function?...

    It says "Method not found" because there is no method Test() in your class, only a constructor with that name (without parameters), as already mentioned by a previous poster. Try to replace the line by new Test(); and it should work. But note that this will create a new object of the class and so, doesn't make any sense.
    Think of constructors being only called when creating a new object. So you don't want "to call the constructor again", because the object already exists.
    Constructors and methods are really something very different. You might have a look at the Java tutorial for further details:
    http://java.sun.com/docs/books/tutorial/java/index.html

  • Abstract Classes vs Private Constructor

    Hopefully this doesn't make me sound to naive
    If we have a super class called food, and subclasses chocolate, chicken, cereal and so on then its clear we dont want to make instances of the super class food correct? So we can make this class an abstract class
    What are the benefits of making a class abstract over making a constructor private and in what circumstance would it be beneficial to do one over the other?
    Thanks, and sorry for a poor example!
    Edited by: compSciUndergrad on Apr 22, 2009 4:53 AM

    wrybread wrote:
    Also, Corlettk -
    Excellent point regarding prudent use of interfaces; thank you. If you read this, I'd appreciate any comment you have on how conservative programmers need to be in designing an interface. It seems to me that if I'm uncertain whether or not to include a certain member in the interface, I should omit it or include it elsewhere (perhaps in an interface all its own, or in an abstract super if that's applicable).
    Let me know if you want me to open this as a new thread; I'm just looking for your take on this topic. -- Thank you!Obviously, there's no right answer. Each deisgn must be assessed on a case-by-case basis. Every design presents new and interesting problems.
    I'm no OO guru... what I do know is that you can make some very nasty mistakes, thanks to experience of maintaining a fairly poorly written (first in the organisation) large java project.
    I'm of the opinion that interface should define an aspect of behaviour... If the Sun GODS had there time again they'd do java.io would be full of interfaces... Closeable, Openable, Readable, Writable, Printable... etc etc etc.
    Please remember that a class (or group of classes) can implement multiple interfaces... and an interface can extend multiple interfaces... So java supports "multiple type inheritance" as apposed to C++'s "multiple implementation inheritance".
    If you need an "aglomerate" interface as the type for a collection then assemble one from your premade "set of aspects"... eg: Input extends Openable, Closeable, Readable...
    package forums;
    interface AnInterface
      public void a();
    interface AnotherInterface
      public void b();
    interface AglomerateInterface extends AnInterface, AnotherInterface
      public void c();
    class AglomerateImpl implements AglomerateInterface
      public static void main(String[] args) {
        try {
          System.out.println("Hello World!");
        } catch (Exception e) {
          e.printStackTrace();
      public void a() {}
      public void b() {}
      public void c() {}
    }PS: You wouldn't normally define multiple interfaces and an implementation all in one file... sort of defeats the whole purpose really... and in fact you can't as soon as you make the interfaces public, which they need to be to be any use.
    Make sense?

  • Creation of a static class with private methods

    I'm new to java programming and am working on a project where I need to have a static class that does a postage calculation that must contain 2 private methods, one for first class and one for priority mail. I can't seem to figure out how to get the weight into the class to do the calculations or how to call the two private methods so that when one of my other classes calls on this class, it retrieves the correct postage. I've got all my other classes working correct and retrieving the information required. I need to use the weight from another class and return a "double". Help!!!
    Here's my code:
    * <p>Title: Order Control </p>
    * <p>Description: Order Control Calculator using methods and classes</p>
    * <p>Copyright: Copyright (c) 2002</p>
    * <p>Company: Info 250, sec 001, T/TH 0930</p>
    * @author Peggy Blake
    * @version 1.0, 10/29/02
    import javax.swing.*;
    public class ShippingCalculator
    static double firstClass, priorityMail;
    //how do I get my weight from another class into this method to use??? not sure I understand how it works.
    public static double ShippingCalculator(double weight)
    String responseFirstClass;
    double quantity, shippingCost;
    double totalFirstClass, firstClass, priorityMail, totalShipping;
    double priorityMail1 = 3.50d;//prioritymail fee up to 1 pound
    double priorityMail2 = 3.95d;//prioritymail fee up to 2 pounds
    double priorityMail3 = 5.20d;//prioritymail fee up to 3 pounds
    double priorityMail4 = 6.45d;//prioritymail fee up to 4 pounds
    double priorityMail5 = 7.70d;//prioritymail fee up to 5 pounds
    quantity = 0d;//ititialization of quantity
    // weight = 0d;//initialization of weight
    // shippingCost = 0d;
    //calculation of the number of items ordered..each item weights .75 ounces
    quantity = (weight/.75);
    if (quantity <= 30d)
    //add 1 ounce to quantities that weigh less than 30 ounces
    weight = (weight + 1);
    else
    //add 2 ounces to quantities that weigh more than 30 ounces
    weight = (weight + 2);
    if (weight > 80d)
    //message to orderclerk ..order over 5 lbs, cannot process
    JOptionPane.showMessageDialog(null, "Order exceeded 5 lbs, cannot process");
    //exit system, do not process anything else
    System.exit (0);
    else
    if (weight < 14d)
    //send message to customer: ship firstclass or priority, y or n
    responseFirstClass = JOptionPane.showInputDialog(null, "Ship first class? y or n?");
    if (responseFirstClass.equals("y"))
    //compute FirstClass shipping cost
    totalFirstClass = ((weight - 1) * .23d) + .34d;
    firstClass = totalFirstClass;
    else
    //compute PriorityMail cost for orders less than 14 ounces
    priorityMail = (priorityMail1);
    else
    if (weight <=16d)
    //compute totalshipping for orders up to 16 ounces
    priorityMail = (priorityMail1);
    else
    if (weight <=32d)
    //compute totalshipping for orders up to 32 ounces
    priorityMail = (priorityMail2);
    else
    if (weight <=48d)
    //compute totalshipping for orders up to 48 ounces
    priorityMail = (priorityMail3);
    else
    if (weight <= 64d)
    //compute totalshipping for orders up to 64 ounces
    priorityMail = (priorityMail4);
    else
    //compute totalshipping for orders up to 80 ounces
    priorityMail = (priorityMail5);
    priorityMail = 0d;
    firstClass = 0d;
    firstClassMail ();
    priorityMailCost ();
    //I think this is where I should be pulling the two methods below into my code, but can't figure out how to do it.
    shippingCost = priorityMail + firstClass;
    return (shippingCost);
    }//end method calculate shipping
    private static double firstClassMail()//method to get first class ship cost
    return (firstClass);
    }//end method firstclass shipping
    private static double priorityMailCost()//method to get priority mail cost
    return (priorityMail);
    }//end method priorityMail
    }//end class shipping calculator

    public class A {
    public String getXXX () {
    public class B {
    A a = new A();
    public void init () {
    a.getXXX();
    }

  • Extending classes with private methods?

    my understanding of extending classes is that you gain all the functions and methods of that class thus You could over ride any one of them. How ever I am confused on weather or not you inherit and can over ride private methods of the class you are extending or if you have to have all methods public in an extended class.
    hope that makes sense, an example can bee seen bellow.
    package
         public class Class1
              public function apples():void
                   //some code
              private fnctuin bananas():void
                   //more code
    package
         public class Class2 extends Class 1
              override public function apples():void
                   //i changed code
              //can I over ride bananas?

    you can only override methods that would be inherited.  a private method won't be inherited:
    http://www.kirupa.com/forum/showthread.php?223798-ActionScript-3-Tip-of-the-Day/page5

  • Why can I chat with a buddy but not add them to my Buddy list?

    I'm using iChat 4.0.2 with OS 10.5.2.
    I add a particular buddy to my list but the name fades in and out and then disappears all together in a few seconds. No matter how many times and ways I try, I cannot add them to my buddy list and get them to stay. I can add other buddies to my list normally.
    During the time I can see this particular buddy's name in my buddy list, if I'm quick enough before they fade out, I can click to connect and chat perfectly. I can also request to view video with them and have them accept and view normally. However, if this buddy sends a video request to me, I hear the ring but then an instantaneous message window appears saying that the buddy "cancelled the invitation".
    Interestingly, after connecting with this particular buddy, I can maintain their text chat window and text chat as normal. This buddy is using iChat 3.1.9 and OS 10.4.11.
    Any help or ideas with how to keep this buddy in my list would be appreciated.

    Interesting.
    I would have gone the iChat > Preferences > Accounts > Security and just checked the Block list first.
    com.apple.ichat.Subnet holds the sort order and Allow/Block lists
    Setting the Preference to Allow All and then checking the Allow option and possibly the Block list would change the Subnet.plist anyway.
    For some the Flashing/disappearing Buddy is a result of iChat 4's response to Feedbag Error 10
    Feedbag errors are AIM codes for problems with the Buddy List.
    In this case it is adding a Screen name with a Real name option and that Real Name is already in the Address Book.
    To restate.
    I would leave the deletion of com.apple.ichat.Subnet.plist (as this will remove all those that may be in your Block list) until all other options have been exhausted.
    8:15 PM Sunday; June 15, 2008

Maybe you are looking for

  • Want to know if my mac has been hacked or if someone is signed on?

    Hello, I've done a shell command "n" and "netstat" and here are the results. Can anyone tell me if someone is singed on or hacking my mac?  Thanks so much!  This is actually just half of it. Last login: Fri Aug 23 18:22:40 on ttys000 curt-studio-a:~

  • Reader 10.1.0 will not open PDF files

    Hi Reader 10.1.0 will not open PDF files in windows 7 64 bit using IE9 However it open using firefox? Is it my settings ? Is this version not compatible with IE9 ??? Please advise Thanks Perry

  • Problem with smartform print preview.

    Hi Experts,                  i have an rare problem i have requirement of  sending PO smartform mail as pdf ,and the smartform is configued to nace, and the tcode is  me23n. we checked it in development server everything went on well,and mail was sen

  • How do I send back the randomly selected checkboxes values back to servlet

    Hello All, Assume I have a table of N rows with two columns. I will have one checkbox on column-1 and zero or more on column-2. Column-1 may represent categories and column-2 represents associated things. Just like below: Column 1 Column 2 Books HFSJ

  • Merging albums in iTunes

    I have uploaded CDs 1 to 4 of a large compilation on my Macbook Pro. The last 3 CDs appear as a single album in iTunes while the first one is standing alone. I would like to merge all 4 CDs into a single iTunes album. How do I do that?