More then 1 class

Hello all, i'm having a problem running another class, one class compills all fine but the main class does not compill keeps coming with errors like this:
cannot resolve symobol
symbol : class Random1
Location class TestRandom
Random r = New Random1();
Here is the code for both:
public class Random1
  private int [] randomNumber;
  public Random1()
    randomNumber = new int [3];
    for (int i=0; i < randomNumber.length; i++)
     randomNumber[i] = (int)Math.floor(1 + (8 * Math.random()));
         System.out.println("no is " + randomNumber);
int getNum ( int elementNo)
return randomNumber [elementNo];
Here is the Main Class:
public class TestRandom
public static void main (String [] arge)
Random1 r = new Random1 ();
int total = 0,a;
for (a=0; a < 3; a++)
total += r.getNum(a);
System.out.println ( " total = " + total);
Its just a simply little program which random selects 3 numbers and puts them in a array and adds them up, if any one could tell me why i keep getting error when i try to compill the main class it would really help me thx.

cannot resolve symobol
symbol : class Random1
Location class TestRandom
Random r = New Random1();Is the class file for Random1 in the same directory? Did you add a "." to the CLASSPATH?

Similar Messages

  • Class Action Lawsuit - if NO Vista x86/X64 drivers 4 ALL sound C that are no more then 7-6 years

    How much processing does a Soundcard do Creative Labs? NOT MUCH.. if my SoundBlaster Li've 5. can work in Windows 95 or a Old SoundBlaster from back in the mid 90s could work in XP then there should be Drivers for VISTA.. I think what your guys are trying do do is a this CASH CRAB and this is not Right. SO
    Creative Labs?you have?till April 2007 to make Vista x86 & X64 drivers for ALL sound cards that are no more then?7-6 years old.. or Face a World-Wide Class Action Lawsuit. All my evidence will prove to the courts that its a CashGrab.. Hell I'm useing XP SoundBlaster Li've 5. drivers in Vista right now so this proves that it will work..Message Edited by jbl2k6 on 0-24-200708:30 AM

    jbl2k6 wrote:
    How much processing does a Soundcard do Creative Labs? NOT MUCH.. if my SoundBlaster Li've 5. can work in Windows 95 or a Old SoundBlaster from back in the mid 90s could work in XP then there should be Drivers for VISTA.. I think what your guys are trying do do is a this CASH CRAB and this is not Right. SO
    Creative Labs you have till April 2007 to make Vista x86 & X64 drivers for ALL sound cards that are no more then 7-6 years old.. or Face a World-Wide Class Action Lawsuit. All my evidence will prove to the courts that its a CashGrab.. Hell I'm useing XP SoundBlaster Li've 5. drivers in Vista right now so this proves that it will work..Message Edited by jbl2k6 on 0-24-200708:30 AM
    We will release Vista drivers for the products we stated we are releasing Vista drivers for on the Vista driver chart. To my knowledge we are currently meeting all legal obligations pertaining to Vista driver support. If this is not satisfactory to you you can feel free to contact Customer Support with your suggestion to release drivers for older products. However, this thread is not appropriate for this forum and is now locked.
    Dale

  • To More Specific Class & Plugin Architecture

    Hello there,
    I have a plugin architecture and I want to load a particular class on demand, when a user clicks a button etc.
    I can do this using 'Get LV Class Default Value.vi' knowing the path of the .lvclass file, and I can then use the 'To More Specific Class' vi to cast it from type LV Object to the specific class I know it to be.
    However if I have 30 different classes with this method I would have to have 30 different class constants in a case structure so I can cast to the right one.  This works but it means all the classes are loaded into memory when the program is run, even though the user may never want to use most of them, which is a waste of time/memory.
    Is there a better way of doing this please?
    Thanks,
    Martin

    I wonder if minute 4:00 in Michael's video will help you. It avoids the constants, as long as all the classes are descendants of a common class:
    http://vishots.com/005-visv-labview-class-factory-pattern/

  • Taking more time(more then 12 hours) while syncing

    I sync some music(about 340 MB) and pics (about 200 MB) to my new Ipad for the first time, and it was ok.
    But when i connect my Ipad Second time to my laptop(running on Windows 8) it was syncing & taking backup for more then 12 hours but still it was not completed. Is there ny problem in My Ipad or in my Laptop or in Itunes.
    Kindly help me,i bought my Ipad just 5 days before.

    Hello,
    Looks like you have a 1:M relationship from TableA to TableB, with a 1:1 back pointer from TableB to TableA. If triggering the 1:M relationship is causing you delays that you want to avoid there might be two quick ways I can see:
    1) Don't map it. Leave the TableA->TableB 1:M unmapped, and instead just query for relationship when you do need it. This means you do not need to call tableA.addTableB(tableB), and instead only need to call tableB.setTableA(tableA), so that the TableB->TableA relation gets set. Might not be the best option, but it depends on your application's usage. It does allow you to potentially page the TableB results or add other query query performance options when you do need the data though.
    2) You are currently using Lazy loading for the TableA->TableB relationship - if it is untriggered, don't bother calling tableA.addTableB(tableB), and instead only need to call tableB.setTableA(tableA). This of course requires using TopLink api to a) verify the collection is an IndirectCollection type, and b) that it is hasn't been triggered. If it has been triggered, you will still need to call tableA.addTableB(tableB), but it won't result in a query. Check out the oracle.toplink.indirection.IndirectContainer class and it's isInstantiated() method. This can cause problems though in highly concurrent environments, as other threads may have triggered the indirection before you commit your transaction, so that the A->B collection is not up to date - this might require refreshing the TableA if so.
    Change tracking would probably be the best option to use here, and is described in the EclipseLink wiki:
    http://wiki.eclipse.org/Introduction_to_EclipseLink_Transactions_(ELUG)#Attribute_Change_Tracking_Policy
    Best Regards,
    Chris

  • How to show an HTML file (more then 1MB size) in JEditorPane

    I an trying to show an HTML file (more then 1 MB size ) in JEditorPane
    but getiing OutOfMemory error.
    if i try the same for size less then 1 MB(i tried till 850KB) then it will work fine.
    I am using setPage() method of JEditorPane.
    please provide solution .

    I meet the same question, and even worse.
    I created a html file with frameset, when i point to the link which is an html file larger than 500kb . it fails. and some error "infinite loop in formatting" is thrown
    in javax. swing.text.FlowView. I read the code of this class, and can't tell what's the error of my application.
    Can someone help and give some answer?

  • Re: How to create More two class with one object

    haii,
             i have small information How to create More two class with one object,
    bye
    bye
    babu

    Hello
    I assume you want to create multiple instance of your class.
    Assuming that you class is NOT a singleton then simply repeat the CREATE OBJECT statement as many times as you need.
    TYPES: begin of ty_s_class.
    TYPES: instance   TYPE REF TO zcl_myclass.
    TYPES: end of ty_s_class.
    DATA:
      lt_itab      TYPE STANDARD TABLE OF ty_s_class
                     WITH DEFAULT KEY,
      ls_record  TYPE ty_s_class.
      DO 10 TIMES.
        CLEAR: ls_record-instance.
        CREATE OBJECT ls_record-instance.
        APPEND ls_record TO lt_itab.
      ENDDO.
    Regards
      Uwe

  • If my component has more then one button,how to create click events

    I am learning about java beans
    My java class
    public class ButtonClass extends JButton implements Serializable{
    // ButtonHandler bh;
    public ButtonClass() {
    setText( "Hello world!" );
    setOpaque( true );
    setBackground( Color.ORANGE );
    setForeground( Color.BLUE);
    setVerticalAlignment( CENTER );
    setHorizontalAlignment( CENTER );
    // addActionListener(new ButtonHandler(new JTextArea("Hello")));
    But i want to create Bean having more then one button on my bean.
    But how to create event individually for each button

    Do you mean how do you process each event from the buttons and know which button casued the event?
    If that is what you mean then look at ButtonGroup. You can add the same mouselistener to each button and then check which one cause the event:
    myButtonEvent.getButton()

  • More then 90 Columns in ALV

    Hi.
    In ALV i want to add more then 90 Columns.
    is their any method to display more then 90 columns in ALV?

    HI,
    ALV is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.
    advantages.
    Collapse multiple reports into one, drastically cutting down your report development time
    Save many hours using built-in ALV sorting, subtotaling and filtering capabilities
    Add conditional structures into your ALV report: No programming required!
    Combine ALV with display variants to meet a wide range of reporting requirements more easily
    Dynamically reorder column layouts and add/subtract fields
    Enable users and analysts to save their own personalized variants
    The keyword is flexibility. In the past I have sometimes programmed more programs that was basically the same report with minor variations - in one case i programmed 10 very similar reports for pp evaluation.
    With ALV the users can define their own display variants without changing the program.
    The display variant covers sorting, summarizing, filtering, hiding fields. The users can also make variants that show only total lines or subtotal lines or both - and by one click in the report they can expand one total line to display the underlying item lines.
    The users can also choose to let the report show directly in excel. This is a very powerful option. You can upload excel templates with predefined formulas and macros. This can make you very popular - especially with Finance people that already have a lot of excel files, they populate with SAP data to make al kind of voodoo calculations that will help them see into the future.
    With ALV you can give them an ABAP report that automatic popup with their own favorite excel book - without having to do a lot of troublesome and time consuming work to download the data and fit it into the excel sheet.
    If you are new to ALV you can very quick make a simple ALV report. Basically it has 3 steps.
    1) build an internal table with the data you want do display
    2) build a field catalog table (each record in this table describes one column in the list)
    3) call the ALV function
    Later you can make use of more complicated functions like call back routines.
    You have both functions modules and ABAP OO classes to help you with step 2 and 3. I have used the function modules for many years so its hard for me to change, but if I should start all over today I would forget about the function modules and go for the OO approach.
    Thanks,
    Sankar M

  • Can I have more then 1 loader or how can I track load of instances?

    Hello, does anybody know if I can have more than one loader?
    Ive made a thumbnailviewer with children, but when I track
    the progressevent, the loader sum it all up to 1 load.
    I want a loader for each picture, how could this be done?
    So can I have more then one loader progressevent?
    any help much appreciated.!
    ps. the "i" in last simpleloader function is there for test,
    and not because I know what to do!

    Oops!
    I did not look at the code close enough.
    First of all, a correct way to add a loaded bitmap image is:
    addChild(Loader.content);
    Second, content is available once it starts loading
    (Event.INIT). So because the content is not available right away -
    there is no parent - if you know what I mean.
    I tried my best to write something that may work (see
    attached code). I did not test it though and even did not test the
    syntax - I am on a computer that doesn't have my development tools.
    The logic is:
    Make container --> make loader --> give them the same
    name for match them later --> attach INIT listener to
    contentLoderInfo --> inside the listener: get the name of the
    loader -- > add loader content to display list --> add
    textfield --> attach progress listener.
    Inside progress listener the logic is the same - to find the
    name an update the appropriate textfield.
    Frankly, this solution doesn't look elegant to me. I would
    rather make a class that extends Loader and handles all the logic.
    Or, perhaps, someone else can show a better way without classes.
    Let me know if it works.
    Second thought: Obviously this solution is a bit stupid -
    when INIT is invoked - image is available and adding the progress
    is useless.
    I am too tired to think about different way to accommodate
    your need for the progress display. But, maybe, if you follow the
    logic you can make appropriate adjustments keeping in mind the
    sequence of the events and availability of the objects.

  • How to return more then one value in OC4J

    Hi,
    do I really need to create a serializable object + interface with an reader and writer to pass more then 2 variables back to the client ?
    Must this object a java bean ?
    .. or does anybody know an easier way to solve this problems.
    greetings
    Mike

    What is your client, and what are you using on the server? Are you trying to return values from a servlet to a web page, or from a servlet to a JSP, or from a EJB to a Java client?
    John H. Hi John
    We have some services currentliy implementet as PL/SQL stored Procedures on Oracle. They are now accessable with DCE and C-clients.
    The task is now to implement the services as Web-Services with SOAP. For that we want to use the OC4J. - as an SOAP Server.
    But unforunatly the only examples I found are returning only one parameter.
    The Java books learned me to create a class and an interface to pass more parameter to the client. This interface should be inherit from Serializable.
    The compiler is happy, the deployment is ok. But when I try to get the wsdl and stub I get something like: "must be an bean" or "have to be a reader and write property.
    From my point of view this looks very complicated. I want to use SOAP and therefore all parameters should be passed with one call and the parameter should be explained in the WSDL so that they could be used independed of the programming language and plattform.
    When I implement the read and write methods I will pass the parameters in one stream. When I only use Java I think this is a solution - but what is with C or other languages.
    Ciao Mike

  • MVC - More then one view managed by the same contrler.

    Ok, I have been reading and searching examples on the MVC .. but all the examples show just what to do when you have just one view of the model. What I f I have the more the n one view to handle the same model.
    As we know the views would need to be registerd inside the controler? How can I do this If I have more then one view?
    does anyone have any ideas!?
    Would it still be correct if when an action occures on my view instead of the controler capturing that event an handiling, I make my view call the controler to handle it?

    So in your opinion is it ok if I call my controler from the action event of my button?
    I just did a small example below:
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    public class Starter extends JFrame{
         private Model myModel = new Model();
         private Controler myControler = new Controler(myModel);
         public Starter(){
              JButton myButton = new JButton("Test");
              myButton.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e){
                        myControler.makeAction("Hello");
              this.getContentPane().add(myButton);
              this.pack();
              this.show();
         public static void main(String[] args){
              new Starter();
    }As you can see I am calling the controler to manage the new data from the action event of 'myButton' !
    Is the above code ok with the spirit of the MVC?

  • More then two attribute in to Hashtable

    I want to store more then two attribute in to Hashtable, So i put the values into class and store the object into the Hashtable.
    Every thing works fine, but how to retrieve the values which are stored in to the object.
    name,sessionid and time are the 3 attribute which i store in the
    Session class. In the hashtable a key("AAA","BBB") and the object is
    stored.I want to get all the attribute values which are stored for a particular key.
    When i display the content of the hashtable for a key,
    System.out.println(ht.get("BBB"));
    I get just the object name but not the values like
    Session@f4a24a
    Is there any way to get the values from the object which are stored into the hashtable. Will any one help me
    Here is the code:
    import java.util.*;
    class Session {
    private String name;
    private String sessionid;
    private long time;
    Session(String n, String s, long t) {
    name = n;
    sessionid = s;
    time = t;
    class Hash{
    public static void main(String args[]) {
    Hashtable ht = new Hashtable();
    Date date = new Date();
    ht.put("AAA",new Session("John", "session1",date.getTime()));
    ht.put("BBB",new Session("White", "session2",date.getTime()));
    System.out.println(ht.get("AAA"));
    System.out.println(ht.get("BBB"));
    }

    Hei!
    Define methods in the Session class with which you can retrieve the private fields from the class, and use these methods.
    for example:
    class Session{
    long getTime(){return time;}
    class Hash{
    System.out.println(((Session)ht.get("AAA")).getTime());
    Pizzarelli

  • Problems with iTunes/ipad2  I'm trying to buy FREE apps and I'm being told my card is declined but I also have more then enough credit on my account! Anyone having this problem?

    Problems with iTunes/ipad2  I'm trying to buy FREE apps and I'm being told my card is declined but I also have more then enough credit on my account! Anyone having this problem?

    Part of the validation for credit cards is that they need to be registered to exactly the same name and address that you have on your iTunes account, which prepaid cards tend not to be. Do you have a proper credit card that you could use ? Or are iTunes gift cards available in your country so that you could try using them as your payment method ?
    Until you have a valid payment method on your account and what you owe iTunes has been paid off then you won't be able to download any item from the store, including free apps (and updates to apps).

  • How do I get the text to flow throughout more then one page.

    Hello,
    I am currently using LiveCycke Designer to create a scholarship for my company. I created fields for the form and I would like to insert a text to describe the scholarship. When I insert the text, it doesn't flow onto the next page. I've tried creating a subform and clicking "flowed" and "allow page breaks within content". I also clicked auto-fit for the height, but it just makes a line. For the text box, I've clicked "Expand to fit on the height". It is also a dynamic XML Form. Is there anything else I should be doing?
    I could always send the file to someone to see if they can figure it out.
    Thank you,
    Natalie

    Thank you so much !
    but the link doesn't seem to work. It says that the URL is not in the correct format for an Acrobat.com document link.
    Natalie
    Date: Wed, 12 May 2010 07:53:12 -0600
    From: [email protected]
    To: [email protected]
    Subject: How do I get the text to flow throughout more then one page.
    Here is the corrected form..Even you you set the Subform type to "Flowed" to the subform where the Text box resides, you did not set the Page1 to Flowed (which is the key)..But when I make the Page1 type to "Flowed", all your fields above the Scholrship text boxes' Subform will go one below another.. To fix this, first I have select all the fields and wrap them into a subform and then set the Page1 to Flowed..
    https://acrobat.com/#d=XQ1yfV8fCk85M7sRLD*-gg
    Thanks
    Srini
    >

  • My ipod wont let me download a game it tells me i dont have enough storage when i have more then enough

    My ipod wont let me download a game it tells me i dont have enough storage when i have more then enough

    To download and install an app the iPod needs storage available equal to about three times the file download size.
    If you sync from your iTunes library less storage available is required.
    Does the app/iPod meet this?

  • If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load

    If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load the tabs or if it does and I then try to add the game or any other site at all on a tab it causes firefox to stop working (though not close) and I have to restart opening and closing it many times to get it to work at all.

    1st, you will not be able to activate your PPro1.5 on ANY new computer, see next link for the special version you MUST use
    CS2 (and earlier) Activation Server http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    2nd, you already mentioned Virtual XP, so if a direct install doesn't work, that would be the way to go... or, to just do what SHOULD work from the start, just do Virtual XP

Maybe you are looking for

  • Custom field in SC with Drop-Down function..

    Hello Friends,    I have a requirement where i have to add new custom field in SC basic data which should have Drop down list option.. If this functionality is available in SRM then the data needs to retrieve from Custom Table.. Please give me sugges

  • Click & drag stops and restarts further away

    When I click and drag, either to move a window, a file or to select text, the thing I wanted to drag loses selection and something else along the path of the cursor is selected. So if I try to drag a window it doesn't and drags another window instead

  • Just bought AV cables to use with iPhone... question

    I bought the Apple brand AV cables to use with my iPhone. It will only work when I plug the cables directly into the phone. Is it not possible to run it through the dock that came with the phone? Is there a way to remotely control the phone while it

  • TS3147 How do I stop auto updates for an HP printer I no longer have?

    I keep getting auto update notices for a printer I have discarded.  How do I stop this?  Within the last year my "HP" printer quit and I replaced it with a "Brother" printer.  It is annoying to keep getting the HP irrelevant update notifications.  I

  • Does SAP direct input programs have authorization checks built-in?

    Can anyone advise if the SAP direct input programs eg. RFBIBL00, RMDATIND,      RCCLBI03,  RM60IN00,   RVINVB10 etc. have authorization checking features? In transaction BMV0,  there is a value for User Name.  If the user executes the direct input jo