• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Hi I have a worksheet question I do not understand

 
Greenhorn
Posts: 2
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Write a line of code to call the method SixTimes() with the object myObject and output the results.
Thanks
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mark and welcome to the Ranch!

Please UseAMeaningfulSubjectLine for the topics you create and ShowSomeEffort when facing a problem.

The issue you are having is pretty simple, and requires some basic knowledge of Java programming.
Suppose you have the following class:

Now if you want to invoke a foo() method on an object of Foo class from, say, main method, you would write:

You can use the code above as a guideline for your question.
 
Mark Cuff
Greenhorn
Posts: 2
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thanks for your response my problem is I have the java main and the driver and i am not really understanding to make one read from the other.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,

As Kemal mentioned, state your problem clearly so that you could be helped..

1. what is 'the worksheet' question?..from the heading, it looks like you are reading an excel spreadsheet into a Java obj.
2. you just need to loop it through the worksheet rows, check if they are not nil, and then read the values...you might want to take a look at jxl.jar library.
3. what form of output are you expecting?
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic