java public access throwing error

Posted on 2009-04-30
Last Modified: 2013-11-23
i have this new function in in javafiles folder
 public BillingDetails getBillingDetails(int appid){
          Connection conn = null;
          entities.BillingDetails billingDetailsList = null;
          String command = "select billingDetailId, billingType, billingRate, billRound from billingdetails where appid = '" + appid + "'";
        try {
   conn = getConnection();
            Statement stmt = conn.createStatement();
   if (stmt.execute(command.toString())) {
    ResultSet rs = stmt.getResultSet();
    while ( {
                    billingDetailsList = new entities.BillingDetails();//error throwing here
    }catch (Exception e) {
   // TODO: Handle
  } finally {
   if (conn != null) {
    try {
    } catch (SQLException e) {
     // TODO Auto-generated catch block
        return billingDetailsList;
and i have this file in entities folder
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
package entities;
 * @author Administrator
public class BillingDetails {
            billingDetailId = 0;
            billingType = 0;
            billingRate = 0.0f;
    private Integer billingDetailId;
    private Integer billingType;
    public Float getBillingRate() {
        return billingRate;
    public void setBillingRate(Float billingRate) {
        this.billingRate = billingRate;
    public Integer getBillingRound() {
        return billingRound;
    public void setBillingRound(Integer billingRound) {
        this.billingRound = billingRound;
    public Integer getBillingType() {
        return billingType;
    public void setBillingType(Integer billingType) {
        this.billingType = billingType;
    private Float billingRate;
    private Integer billingRound;
    public Integer getBillingDetailId() {
        return billingDetailId;
    public void setBillingDetailId(Integer billingDetailId) {
        this.billingDetailId = billingDetailId;

now in the line commented it is throwing the errror that BillingDetails is not public in entities, it cannot be accessed outside the package. Can you please help me here
Question by:SunScreenCert
    1 Comment
    LVL 92

    Accepted Solution

    >         BillingDetails(){

    make that:

           public BillingDetails(){


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now