Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Array or ArrayList ?

25ff03f5-c9c5-4664-afa2-81d36adb4ba8Oct 2 2018 — edited Oct 26 2018

Hello Everybody,

I am quite new to Java, and I am working on a little project for myself to extend my knowledge skills in Java.

I am developing a little Programm called "Team Fees" for our team, where I can store the fees each player has.

The fees differentiate in 3:

  1. General fee
  2. Training fee
  3. GameDay fee

For Each of those I made a class.

  1. GeneralFine
  2. TrainingFine
  3. GameDayFine

For Each of those classes, they have Attributes FeeId, FeeDescription and FeeAmount.

Let's stick at first to the GeneralFine class.

I have a list with 12 fines for the GeneralFine class.
Each fine should have a FeeId, FeeDescription and an FeeAmount.

My Idea is that when I instantiate an Object from the Class GeneralFine, then the Object also should have an FeeId, FeeDescription and FeeAmount.

In the class I want to declare the FeeId, FeeDescription and FeeAmount. I am not sure tho how to do it the best and efficient way, shall I take Array or ArrayList ?

FeeId is of String Type

FeeDescription is also of String Type

FeeAmount is of double Type.

I want to make a list for the FeeDescription and FeeId and when I have it, I want to assign each object of the GeneralFine class a FeeId and FeeDescription from that Array.

Because at the End, one or more Player can have the same fees.

Comments

Hadar Paiss

Hi,
There are few issues in the upgrade that might arise concerning logins:
with default install oracle 19 password are case sensitive
The password 'format' changed. You can check in dba_users
You might need to add to sqlnet.ora the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER=11
look into https://docs.oracle.com/en/database/oracle/oracle-database/18/spmsu/finding-and-resetting-user-passwords-10g-password-version.html#GUID-D7B09DFE-F55D-449A-8F8A-174D89936304
It will cover some of it.
Regards,
Hadar

User_YAOJZ

Thanks Hadar. The password issue I knew about. I added the code to SQLNET.ORA in both the oracle_home/network/admin folder and the instantclient/network/admin folder and now get an ORA-12504 error.
I added both a tnsnames.ora and listener.ora files to both folders (with appropriate settings) but can't get past the 12504 error.
Any ideas? Greatly appreciated!
tnsnames.ora (orcltest is name of database, brian-surface4 is name of PC)
LISTENER_ORCLTEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

ORCLTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcltest)
)
)
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oracle\WINDOWS.X64_193000_db_home)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\oracle\WINDOWS.X64_193000_db_home\bin\oraclr19.dll")
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Brian-Surface4)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

User_B9CRX

Just to clarify, do you mean you upgraded the database the app is still at Legacy 11g app client? You are testing this where the database and client are on the same host?

1 - 3

Post Details

Added on Oct 2 2018
3 comments
747 views