Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Plan your Crypto & Forex entries before you take the trade
romeshnonis
Updated:
Today at 3:20 AM
RHCSA, RHCE, AWS, Docker, Kubernetes Training
Sanjeewani95
Updated:
Tuesday at 10:28 AM
🛡️ Kaspersky Antivirus – 1 Year / 1 Device | Rs. 2,300 | Only 9 Left
KSPathirana
Updated:
Sep 7, 2026
Ad icon
Professional CCTV Installation Service
Techguy231
Updated:
Sep 6, 2026
Ad icon
I'll research & write an article - Rs. 2000 onwards
Blogerwiki
Updated:
Sep 3, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
ElaKiri Programmer's Club
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="tery123" data-source="post: 18242074" data-attributes="member: 343391"><p>[PHP]import java.util.*;</p><p></p><p>public class Invoice{</p><p></p><p> private String strCustName,strCustAddr;</p><p> private int intInvoiceNum;</p><p> private Date dtInvoiceDate;</p><p></p><p> Invoice(String sCN,String sCA,int iN,Date dt){</p><p> strCustName=sCN;</p><p> strCustAddr=sCA;</p><p> int intInvoiceNum=iN;</p><p> dtInvoiceDate=dt;</p><p></p><p> }</p><p></p><p> class InvoiceItem{</p><p> private int intLineItem , intItemID , intUnits;</p><p> private String strItemDesc;</p><p></p><p> InvoiceItem(int li,int id,int iu,String desc){</p><p> intLineItem=li;</p><p> intItemID=id;</p><p> intUnits=iu;</p><p> strItemDesc=desc;</p><p></p><p> }</p><p> public void showInvoice(){</p><p></p><p> System.out.println("Customer name: " + Invoice.this.strCustName);</p><p> System.out.println("ITEM DESCRIPTION:" + strItemDesc);</p><p></p><p> }</p><p> }</p><p>}</p><p>[/PHP]</p><p></p><p>[PHP]import java.util.*;</p><p>public class UseInvoice{</p><p></p><p> public static void main(String args[]){</p><p> Date today=new Date();</p><p> Invoice myInvoice = new Invoice("AMILA","SRI LANKA",003,today);</p><p> InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");</p><p> }</p><p></p><p>}[/PHP]</p><p></p><p>mokakda bun meken ena compile error eka???/</p><p></p><p>[PHP]E:\myjava\UseInvoice.java:7: error: cannot find symbol</p><p> InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");</p><p> ^</p><p> symbol: class InvoiceItem</p><p> location: class UseInvoice</p><p>E:\myjava\UseInvoice.java:7: error: cannot find symbol</p><p> InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE");</p><p> ^</p><p> symbol: class InvoiceItem</p><p> location: class UseInvoice</p><p>2 errors</p><p></p><p>Tool completed with exit code 1</p><p>[/PHP]</p><p></p><p><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /><img src="/styles/default/xenforo/smilies/default/nerd.gif" class="smilie" loading="lazy" alt=":nerd:" title="Nerd :nerd:" data-shortname=":nerd:" /></p></blockquote><p></p>
[QUOTE="tery123, post: 18242074, member: 343391"] [PHP]import java.util.*; public class Invoice{ private String strCustName,strCustAddr; private int intInvoiceNum; private Date dtInvoiceDate; Invoice(String sCN,String sCA,int iN,Date dt){ strCustName=sCN; strCustAddr=sCA; int intInvoiceNum=iN; dtInvoiceDate=dt; } class InvoiceItem{ private int intLineItem , intItemID , intUnits; private String strItemDesc; InvoiceItem(int li,int id,int iu,String desc){ intLineItem=li; intItemID=id; intUnits=iu; strItemDesc=desc; } public void showInvoice(){ System.out.println("Customer name: " + Invoice.this.strCustName); System.out.println("ITEM DESCRIPTION:" + strItemDesc); } } } [/PHP] [PHP]import java.util.*; public class UseInvoice{ public static void main(String args[]){ Date today=new Date(); Invoice myInvoice = new Invoice("AMILA","SRI LANKA",003,today); InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE"); } }[/PHP] mokakda bun meken ena compile error eka???/ [PHP]E:\myjava\UseInvoice.java:7: error: cannot find symbol InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE"); ^ symbol: class InvoiceItem location: class UseInvoice E:\myjava\UseInvoice.java:7: error: cannot find symbol InvoiceItem myInvItem= new InvoiceItem(1,325,25,"CHOCALTE"); ^ symbol: class InvoiceItem location: class UseInvoice 2 errors Tool completed with exit code 1 [/PHP] :nerd::nerd::nerd::nerd::nerd::nerd: [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom