Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Hi guys my code here is showing errors specifically cannot find symbol even though i have declared this

  1. #1
    Junior Member
    Join Date
    Apr 2022
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Hi guys my code here is showing errors specifically cannot find symbol even though i have declared this

    package classes;


    import java.util.Date;

    public class Transaction {

    private Date date;
    private Item item;

    public Transaction(Item item) {
    date = new Date();
    this.item = item;
    }

    public Date getDate() {
    return date;
    }

    public void setDate(Date date) {
    this.date = date;
    }

    public Item getItem() {
    return item;
    }

    public void setItem(Item item) {
    this.item = item;
    }

    }

  2. #2
    Member
    Join Date
    Apr 2022
    Posts
    36
    Thanks
    0
    Thanked 8 Times in 8 Posts

    Default Re: Hi guys my code here is showing errors specifically cannot find symbol even though i have declared this

    you need to define class Item

Similar Threads

  1. Cannot find symbol errors
    By UM68 in forum Object Oriented Programming
    Replies: 9
    Last Post: September 26th, 2013, 02:41 PM
  2. Replies: 3
    Last Post: March 6th, 2012, 03:50 AM
  3. Remaining compile errors: no suitable method found for & cannot find symbol
    By ChuckLep in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 12th, 2011, 03:33 PM
  4. Cannot Find Variable/Symbol Errors... why?
    By bgroenks96 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: June 9th, 2011, 04:12 AM
  5. Help with Cannot Find Symbol Variable errors
    By skboone in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 20th, 2010, 10:52 AM

Tags for this Thread