Class methods in separate file

I have created a class and I want to put each method in its own separate file in order to not to have one huge file
Can I do this, and if so how?

Adding to that...
In the vast majority of cases if your source file is huge then your design is bad. Very bad.
(On the upside, if someone is trying to produce job security, then creating large un-maintainable god classes, guarantees that no one will ever be able to get rid of that person. At least not if the application needs to change in the next several years.)

Similar Messages

  • Generic instance maker and class definition in separate files - problem

    file: genericinstantiator.java
    package testGenericInstantiator;
    public final class GenericInstantiator {
         public <T> T makeInstance(Class<T> c) {
              T instance = null;
              try {
                   instance = c.newInstance();
              } catch (IllegalAccessException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return instance;
    file: genericinstantiatorusage.java
    package testGenericInstantiator.usage;
    import testGenericInstantiator.GenericInstantiator;
    final class SillyClass {
         public void sayBoo() {
              System.out.println("boo");
    public final class GenericInstantiatorUsage {
         public static void main(String[] args) {
              GenericInstantiator gi = new GenericInstantiator();
              SillyClass sc = gi.makeInstance(SillyClass.class);
              sc.sayBoo();
              System.exit(0);
    thrown exception:
    java.lang.IllegalAccessException
    on the line 'instance = c.newInstance();' in instantiator
    reason in jdk:
    if the class or its nullary constructor is not accessible.
    question:
    how to avoid this? (in my situation, the place of making instance and its class MUST be separated in another files)
    Edited by: gizmo640 on Mar 27, 2008 11:39 AM

    package testGenericInstantiator;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.InvocationTargetException;
    public final class GenericInstantiator {
         public <T> T makeInstance(Class<T> c) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException {
              T instance = null;     
              Class[] emptyParams = {};
              Constructor<T> con = c.getDeclaredConstructor(emptyParams);
              con.setAccessible(true);
              instance = con.newInstance();
              return instance;
    }setting constructor to accessible works well too

  • Creating Private Inner Classes in Separate Files

    I sometimes find myself wanting to use private inner classes to do things, but then moving the classes to separate files and giving them package access just because I don't like having single large files.
    Is there a way to create private inner classes on a class but just save them in another file?
    Thanks,
    John

    For me, short file sizes usually make design structure
    more clear. This can make maintenance easier. It can
    also make browsing the code easier, even if you have a
    good editor or IDE. It is also less intimadating
    psychologically (for me, anyway) to work with a number
    of small files, each one with a distinct purpose, than
    it is to open up a monster, even if the monster does
    represent a coherent design unit in some sense. I
    think this psychological impact may be more important
    than most people give it credit for.The psychological impact is lessened if you use an IDE like VisualAge (where only one method at a time is generally displayed) or use the "Show Source Of Selected Element Only" option in Eclipse.
    It's one thing to say a method should be short and a class should have as few methods as possible. Those forces reduce complexity and ease maintenance. It's another to say a source file should be short. A source file is just a storage artifact; source code could be stored in a database without changing how the programmer interacts with it. The fact that the standard java compiler requires the implementation of nested classes to be stored inside the source file of their containing class is a minor inconvenience. Don't let it discourage you from using inner classes when they make sense. The design should not be driven by source file size considerations.
    >
    But you have added code only with the sole intent of
    making a source file smaller. If Java had amechanism
    for storing nested classes in other files youwouldn't
    do this. My point below was that you shouldn't let
    source file size override the decision to use anested
    class.Why shouldn't I let it? There are plenty of
    non-trivial benefits (the ones I gave above, for
    starters) to working with smaller files.Because all of those benefits can be gained from using a decent IDE. Eclipse is free. It can show only the current method and it can collapse nested classes.
    You say "If
    Java had a mechanism...." Well, I could answer: It
    does have such a mechanism, and that mechanism is
    packages.Packages are not a mechanism for creating private inner classes in separate files. Eclipse has a mechanism for making the fact that they reside in the same source file a non-issue.
    >>
    I am not being cavalier. I have no argument, onlyan
    opinion.Again, you are perfectly entitled to your opinion.
    But if it is truly an opinion, and nothing more, why
    bother telling me about it. You might as well post
    your favorite color. It is the reasons for your
    opinion that interest me, and you still have not
    really given any.I have had lengthy arguments about the issue of method and class size. Like I said before, I prefer very small classes and methods. I also think the number of nested classes should be as small as possible. But I have no problem with large files. Files are just one way to organize source code. The size of the things in the files matters, not the files themselves.

  • Invoking a method in WSDL file from client class

    Hi,
    I have got a WSDL file and I have to invoke certian methods from a client class from the WSDL file. What exactly should I do to invoke them from a Java standalone program /servlet/JSP. There is a sayHello() method in the WSDL. Please tell me how to invoke that method from client side. Aslo please let me know the jar files that are needed.
    Below is the WSDL file
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://tutorial.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://tutorial.com" xmlns:intf="http://tutorial.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.2.1Built on Jun 14, 2005 (09:15:57 EDT)-->
    <wsdl:message name="sayHelloResponse">
    </wsdl:message>
    <wsdl:message name="sayHelloResponse1">
    <wsdl:part name="sayHelloReturn" type="xsd:string"/>
    </wsdl:message>
    <wsdl:message name="addRequest">
    <wsdl:part name="a" type="xsd:int"/>
    <wsdl:part name="b" type="xsd:int"/>
    </wsdl:message>
    <wsdl:message name="sayHelloRequest">
    </wsdl:message>
    <wsdl:message name="addResponse">
    <wsdl:part name="addReturn" type="xsd:int"/>
    </wsdl:message>
    <wsdl:message name="sayHelloRequest1">
    <wsdl:part name="name" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="Hello">
    <wsdl:operation name="sayHello">
    <wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"/>
    <wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse"/>
    </wsdl:operation>
    <wsdl:operation name="sayHello" parameterOrder="name">
    <wsdl:input message="impl:sayHelloRequest1" name="sayHelloRequest1"/>
    <wsdl:output message="impl:sayHelloResponse1" name="sayHelloResponse1"/>
    </wsdl:operation>
    <wsdl:operation name="add" parameterOrder="a b">
    <wsdl:input message="impl:addRequest" name="addRequest"/>
    <wsdl:output message="impl:addResponse" name="addResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloSoapBinding" type="impl:Hello">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="sayHelloRequest">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="sayHelloResponse">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="sayHello">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="sayHelloRequest1">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="sayHelloResponse1">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="add">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="addRequest">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="addResponse">
    <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://tutorial.com" use="encoded"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
    <wsdl:port binding="impl:HelloSoapBinding" name="Hello">
    <wsdlsoap:address location="http://localhost/WebService1/services/Hello"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Thanks in advance
    Prashanth

    Hi.
    Please put this line in the google search engine "Invoking java web service" u will get lots of the links.
    Sanjay Kumar Gupta
    [email protected]

  • Problemes with the method listFiles() in File class. I'm using JDeveloper 3.0

    Hi!
    Why can't I compile this snip of code?
    I get:
    Error: (19) method listFiles() not found in class java.io.File.
    Here is the code:
    package stream;
    import java.io.*;
    import java.util.*;
    public class myStream {
    public static void main(String[] args) {
    File myFile = new File("D:/myjava");
    File[] str = myFile.listFiles();
    Thanks in advance
    Henning

    There is no method "listFiles()" in "File" class. (JDK 1.1.8)
    You can try to use " list() " method which
    Returns a list of the files in the directory specified by this File object.
    raghu
    null

  • How to call inner class method in one java file from another java file?

    hello guyz, i m tryin to access an inner class method defined in one class from another class... i m posting the code too wit error. plz help me out.
    // test1.java
    public class test1
         public test1()
              test t = new test();
         public class test
              test()
              public int geti()
                   int i=10;
                   return i;
    // test2.java
    class test2
         public static void main(String[] args)
              test1 t1 = new test1();
              System.out.println(t1.t.i);
    i m getting error as
    test2.java:7: cannot resolve symbol
    symbol : variable t
    location: class test1
              System.out.println(t1.t.geti());
    ^

    There are various ways to define and use nested classes. Here is a common pattern. The inner class is private but implements an interface visible to the client. The enclosing class provides a factory method to create instances of the inner class.
    interface I {
        void method();
    class Outer {
        private String name;
        public Outer(String name) {
            this.name = name;
        public I createInner() {
            return new Inner();
        private class Inner implements I {
            public void method() {
                System.out.format("Enclosing object's name is %s%n", name);
    public class Demo {
        public static void main(String[] args) {
            Outer outer = new Outer("Otto");
            I junior = outer.createInner();
            junior.method();
    }

  • Run() and start() in separate files

    Halo all,
    I have a Thread class and its driver class.
    Thread t = new Thread();
    t.start();
    I have the above statements within a loop in my driver class and I would like to write the run() method in my Thread class. Is there a way to do that ?

    Below are 2 separate files which I made some modification. The start() command in main() will look for the run() method, but the run() method is in another file.
    public MyClass implements Runnable {
    public void run() {
    }>
    class TestMyClass extends Thread {
    public static void main(String args[]) {
    MyClass mc = new MyClass();
    Thread t = new Thread(this);
    t.start();
    }}

  • Can't navigate to a page when using a class method

    I am working on windows phone 8.1 universal app where I have created a class method and placed it in the NavigationHelper_LoadState method of one of the  pages in my app. My navigation is as follows, I click on a link on my Mainpage and that takes me
    to the page in question,  where I have placed the class method in LoadState.
    The class method checks the authentication state of the user. If the user is not logged in, it is supposed to take him to a separate login page (SHDSignIn from the snippet below).
    The problem I am running into is that when I hit that part of the code in my class method, it just steps through the redirect code but doesn't take me to the login page but rather takes me to the  page that was clicked from mainpage.
    From the troubleshooting I have done up to this point seems like an issue probably because I am calling the method from NavigationHelper_LoadState and the system doesn't like it?? Can someone please explain and also provide a workaround for this?
    Here is my code for the class function:
    public async void SHDAuthState(string errormessage, ProgressBar myprogressbar, TextBlock mytextblock, TextBlock myservernetworkerror)
    //Get the values for the userID and password from the settings....
    string shdLoggedInValue = (string)appRoamingSettings.Values["shdLoggedIn"];
    //If not logged in, redirect to the SHD sign in page...
    if (shdLoggedInValue != "Yes")
    this.rootFrame.Navigate(typeof(SHDSignIn));
    //Getting the cookie if it has expired..
    else
    //Get the cookie value...
    string myCookieValue = (string)appRoamingSettings.Values["MyCookie"];
    //Get the original cookie obtain time....
    long CookieObtainedTimeValue = (long)appRoamingSettings.Values["CookieObtainedTime"];
    //Convertig date/time back to DateTime object....
    origCookieObtainedTime = DateTime.FromBinary(CookieObtainedTimeValue);
    currentDateTime = DateTime.Now;
    //Check to see if cookie has expired....
    cookieTimeElasped = currentDateTime - origCookieObtainedTime;
    cookieTimeElapsedMins = cookieTimeElasped.TotalMinutes;
    // 2 days = 2880 mins but we give a margin of 1 minute
    //Get a new cookie if it has expired and save to settings
    if (cookieTimeElapsedMins >= 2879)
    // Start showing the progress bar...
    mycontrols.progressbarShow(myprogressbar, mytextblock);
    //Get the values for the userID and password from the settings....
    string UserIDValue = (string)appRoamingSettings.Values["UserID"];
    string PasswordValue = (string)appRoamingSettings.Values["Password"];
    //Update the requestData string before sending.....
    requestData = "{" + string.Format(RegisterRequestData, UserIDValue, PasswordValue) + "}";
    string registerResults = await SHDAPI(registerUrl, requestData, errormessage);
    if (registerResults != null)
    // Get the cookie and the time and save it to settings
    var shdCookie = JsonConvert.DeserializeObject<SHDHelper.SHDObject>(registerResults).RegistrationCookie;
    //Save cookie to the app settings
    appRoamingSettings.Values["MyCookie"] = shdCookie;
    // build the UI
    // Stop showing the progress bar...
    mycontrols.progressbarNoShow(myprogressbar, mytextblock);
    else
    // Stop showing the progress bar...
    mycontrols.progressbarNoShow(myprogressbar, mytextblock);
    //Show the error message...
    myservernetworkerror.Visibility = Windows.UI.Xaml.Visibility.Visible;
    Also, I have the rootFrame defined as follows in my class:
    Frame rootFrame = Window.Current.Content as Frame;
    I am calling the class method from the LoadState method as follows
    SHD_helper.SHDAuthState(errorMessage, pgbar, pgText, ServerNetworkError);
    thanks
    mujno

    that is correct.  I wanted to keep the login page redirect inside my class method so that I could do the check every time someone came to pages that require authentication. I wanted it in the LoadState method so I can do a check there, redirect
    them to login page or just get a cookie and then pass that cookie to page to build the UI for the page
    I can do what you are suggesting and have actually tried it but then I have to track which page to take the user to after they log in...
    I have multiple clicks in the appbar  and pages from where the user can come to these authentication-bound pages..
    Suggestions?
    Also, what am I doing wrong in my class method that it doesn't navigate to the login page in the LoadState method?
    Thanks 
    mujno

  • Is it possible to call a class in a jar file from JNI environment?

    Hi
    Is it possible to call a class in a jar file from JNI environment?
    Thanks in advance.

    Could you explain a bit more what you are trying to do? (In other words, your question is vague.)
    o If your main program is written in C, you can use JNI to start a JVM, load classes from the jar of your choice, and call constructors and methods of the objects defined in the jar.
    o If your main program is java, and has been laoded from a jar, a JNI routine can call back into java to use the constructors and methods of classes defined in the jar(s).

  • Save each page of a multi-page document as a separate file using spawned file names with javascript

    Hello
    We are currently changing our hard-copy personnel files and converting them to pdf files.  We have scanned the entire file into one multi-page document.
    I am wanting to save each page (or groups of pages) as separate files.
    In order to facilitate this, I have duplicated field names--such as FirstName, LastName, EmpNo on each page.  This information should be static for the entire file.
    However--I also need information that will change for each individual "page" or document--such as TypeOfDoc, Date, etc.  I have used the Spawn fields using the overlay method on each of the pages in the document.  Then I went in and filled in the information for each page of the document--such as TypeOfDoc, DateOfDoc.
    Now I want to save each page of the document as a separate file using the field names as the file name.
    I first created an action that would split all the pages into separate files and save them into a folder.
    Then I want to save each file as a specific file name based on the information in the fields.
    My problem is obtaining the name of the spawned field name.  The rest of the field names I am not having a problem with.
    This is what I have so far to name the file.
    // Get the field value
    var oPage = this.pageNum;
    var fn = getField("P" + oPage + ".TEMPLATE.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    // Save the file
    myTrustedSpecialTaskFunc(this, fp);
    This code is also accompanied with folder level scripts.
    My problem is obtaining the name of the spawned fields using javascript.  Each document has several pages--so I would like to obtain the field name through script.
    I receive the following error.
    TypeError: getField("P" + oPage + ".TEMPLATE.DATE") is null
    I think this is due to the fact that I have extracted all the pages as individual files.
    If I were to do the above, but not extract the pages first--I do not know how to just save one page at a time.
    Please help.  This is a massive project, and if we have to save each file individually, it will take a lot of time.
    I am a beginner, so any assistance is appreciated.
    Thank you

    I am not understanding exactly where to put the curly brackets.  I have tried two different ways, and still get the same error.
    This is one way
    var oPage = this.pageNum;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    for (var i = 0; i < this.numPages; i++) 
    var fn = getField("P" + oPage + ".template.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    {this.extractPages({  
    nStart: i,  
    cPath : fldr + fn + ".pdf"
    The other is this
    var oPage = this.pageNum;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    for (var i = 0; i < this.numPages; i++) 
    var fn = getField("P" + oPage + ".template.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    this.extractPages({  
    nStart: i,  
    cPath : fldr + fn + ".pdf"
    Thank you for your help.

  • Labels in Separate File

    Folks,
    I have a requirement where in I want to store the labels in the JSF page in a separate file and include that using placeholders in the JSF page. I know with resource bundle that can be done but for that I need to use h:outputlabel that will encounter the complete JSF component lifecycle.
    Is there any alternate way to do that in JSF.
    Regards
    mailtoagarg

    Adding to that...
    In the vast majority of cases if your source file is huge then your design is bad. Very bad.
    (On the upside, if someone is trying to produce job security, then creating large un-maintainable god classes, guarantees that no one will ever be able to get rid of that person. At least not if the application needs to change in the next several years.)

  • How can i get an overview of the available classes of a .dll file?

    Hello,
    i have never worked with JNI bevore.
    For implementing a small application, i have to work with the functionality of a .dll -file from windows, but i cant find any documentation about the inherited methods.
    So is there a possibility in JNI to get a kind of overwiew about the methods are available in an .dll Library?
    I'll be very thankful about any kind of advice
    Edited by: schwaijo on Oct 31, 2008 5:34 AM

    schwaijo wrote:
    Hello jschell,
    thank you for your answer.
    let me try to clarify question with a few more facts about that what i want to do.
    I saw a example where the .dll file wich should be uses has been made available with:
    System.loadLibrary("XTapi");<<and the methods that are used has been declared with:
    private native int initTapi();<< for exampleWhat i want to do is, to access the methods of tapi32.dll file of windows in the same way, but there is nowhere to find a documentation about this file.
    You have a JNI library and you are not the owner or at least you do not have the source code.
    The JNI methods in the dlls cannot be accessed via java in any other manner than what the java code of the library already does. That is because the C signature of the name depends on the java package and class names.
    As I noted you can find the methods of the dll. You could, with a LOT of work reverse engineer the dll.
    So,can anybody tell me weather there is a way in JNI to get more Informations about the methodes in that file?As I already said, there are OS specific tools that allow you to determine at least the name of the method. I suspect that is all the information that exists.

  • More than one class in a single file

    Hi,
    I am having two classes in one file. One is public and another one is internal. I am calling the internal class methods in some other files. If I compile the files(where I am calling the internal class methods) alone , I am getting compilation errors, If I compile whole package , I am not getting compilation errors. What is the reason. Anyone tell me.

    First u mention ur code then i can tell u properly.That's completely unnecessary in this case. The explanation was clear enough.
    may be u didn't write import statement in that class where u have to implement internal class methodModi, this is complete nonsense. The class would only be visible to other classes in the same package under the rules of Java, so the import statement would be redundant, and in any case it wouldn't solve the problem, as you would have discovered if you had tried it, which you obviously didn't.
    @OP: the reason is that the compiler doesn't know where to find the source of the internal class when compiling the other classes that use it. Generally speaking you shouldn't do this, you should put the internal class into its own source file, unless the source file it's presently contained in is the only one that references the internal class. So, either put it into its own source file or make sure the existing source file is compiled before compiling the others.

  • Can I create a JTA EntityManagerFactory in a utility class in a .jar file?

    I have utility classes in a .jar file inside of a .war file deployed in Glassfish 3.1. One of these utility classes, CredentialsUtil, needs to access a database. I can't inject an EntityManager into CredentialsUtil since it is not an EJB. (For security reasons I don't want to make CredentialsUtil an EJB. I want it to be a POJO.)
    In CredentialsUtil I need an EntityManagerFactory that is connected to a datasource defined in Glassfish. Here is the line from CredentialsUtil.java and from the persistence.xml both of which will be in the util.jar file:
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("Credpu");
    <persistence-unit name="Credpu" transaction-type="JTA">
    I can't use RESOURCE_LOCAL since any changes to the datasource configuration must be done in Glassfish rather than changing persistence.xml.
    (The transaction context is not important in CredentialsUtil. It will be called by a WS-Security handler which may not have a transaction context.)
    Can I put the persistence.xml and the CredentialsUtil class that creates the EntityManagerFactory from it inside of the util.jar file (which will be in a .war), or do I have to move the class and a copy of the persistence.xml file out to the .war file? (I'll have to leave persistence.xml in the .jar file too since there are some @Entity in the .jar file. I don't know why but there are @Entity pojos in the .jar file.)
    I'd like to use the existing persistence.xml, but if I can't is there is a way to create an EntityManagerFactory (or EntityManager) that gets its datasource directly from Glassfish, ignoring persistence.xml?
    Thanks.

    Styles in Pages are saved in the documents (or templates). There is no easy method for adding a style to a built-in template (and it is strongly recommended that you do not tamper with them). You can open a built- in template, add your style and save it as a user template so that your new style will be standard in documents created from that template.

  • How many classes should a .java file contain?

    Are there any general guidelines on how many Java classes should be contained in a single .java file? I've been creating a new .java file for each class I write but see examples in Sun's Java tutorial where there are at least two classes in a single .java file. One such case is the TableDemo example at
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/TableDemo.java
    Thanks.

    The example you point to isn't really more the one class in one java file. It makes use of an inner class. An inner class is something different! As far as I understand it, it is mainly used to implement some behaviour (in this case AbstractTableModel behaviour). If the MyTableModel was in a separate class file, it couldn't access the variable of the main TableDemo class. So they use an inner class.
    So unless you need inner classes, this example is no reason to put more than one class in a .java file. In general, just put one class in a .java file. It's easier for everybody.

Maybe you are looking for

  • Inbound File Adapter problem

    Can someone tell me why my message is not processed by XI. I use a File Adapter. The File Adapter is "active" with the following configuration. Adapter type = File transport protocal = Filesystem message protocol = File adapter engine = integration s

  • PDF from PostScript file with hyperlinks/bookmarks

    Is there a way to include hyperlinks and bookmarks when printing to Postscript file. Direct Export to PDF creates a huge file size so I need to go the PostScript/Distiller route.

  • 30 pin connector

    Is the cord that came with my iPad the same as the one that came with my iPhone 3G? The difference being in the brick that is plugged into the wall? I have many of these laying around and want to know if they are interchangeable?

  • New podcasts not showing up in iTunes

    http://rototalk.com/?feed=podcast My feed had been working fine in iTunes until I uploaded a new episode yesterday.  However, this new episode (#8) is not appearing in iTunes (or stitcher for that matter, which I was just approved for yesterday). Fee

  • Hi there im not able to download pscc onto my surfacepro 2 .i get error msg 49

    99