Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4014178
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:27:55+00:00 2026-05-20T09:27:55+00:00

hello everyone I am newto programming and I am just a little bit confused.

  • 0

hello everyone I am newto programming and I am just a little bit confused. I have three files in java

Product.java this file defines the product attributes like product name, quantity, ID
in this file i dont have a main

ProductCollection.java
this file create a vector to hold data temporarily when accessing database

Database.java
database connection

EServer
communicate with client and retrieve access database

rs = query.executeQuery(queryString);
pColl = new ProductCollection();<-------------------confuse
product extractedProduct; <------------------------ confuse
while(rs.next())
{

    extractedProduct = (Product).addProduct(rs);
    // Object [ ] extractedProduct  = ProductCollection.addProduct(rs);
}

EClient.java

can someone explain this two line please

[ pColl = new ProductCollection();] [ product extractedProduct;]

also I am struggling to add an object to store the result temporary. Can someone help me please I want extract out the contents of a row and set up a Product object extractedProduct

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:27:56+00:00Added an answer on May 20, 2026 at 9:27 am
    pColl = new ProductCollection();
    

    This is as simple assignment. On the left hand side you have a variable, pColl, and on the right hand side you have an expression that creates a new object of type ProductCollection and returns a reference to it.

    product extractedProduct;
    

    This is a variable declaration which says, “from this line on, I want to be able to use a variable which I call extractedProduct and it refers to a product” (or, put another way, you declare a variable of type product).


    The Java convention says that class names should start with a capital letter, so you probably want to change the name of the class so it reads

    Product extractedProduct;
    

    Useful links:

    • Official trail on Java Variables
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I am just learning my first programming language and have just corrected
hello everyone im trying to create this tweak that copies a file from one
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
hello everyone I have 3 files: engine script #! /bin/tcsh -f cat $1 |./hello
Hello everyone and thanks in advance for reading this.. I have the following html
Hello everyone i am new to rails just wanted to ask What this line
Hello everyone I am new to Java so i think the answer to this
Hello everyone don't know why this code works on windows but not on linux
Hello everyone, I have some confusion regarding some Win32 API data types and macros
Hello everyone I am getting this exception: The magic number in GZip header is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.