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.


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

Results 1 to 2 of 2

Thread: object

  1. #1
    Junior Member
    Join Date
    Sep 2014
    Thanked 0 Times in 0 Posts

    Default object

    Weet iemand waarom dit niet werkt?
    public class objecttest {	
    	 String soort;
    	 int leeftijd;
    	 String Geslacht;
     public	static void main(String[] args) {
    		Kip niels = new Kip();
    		Kip wendy = new Kip();
    	 niels.soort = "groot";
    	 niels.leeftijd = 15;
    	 niels.geslacht = "man";
    	 wendy.soort = "klein";
    	 wendy.leeftijd = 45;
    	 wendy.geslacht = "vrouwtje";
             System.out.println("De kip niels:");
    	 System.out.println("De kip wendy:");

    Hi, does anyone know why this doesn't works? Do not mind the strange variable names, it is dutch.
    Yours sincerely, Niels

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Eastern Florida
    Thanked 2,455 Times in 2,406 Posts

    Default Re: object

    why this doesn't work
    Please explain what happens? What does the program do or not do that is unexpected?
    If there are error messages, copy the full text and paste it here.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. [SOLVED] Need help, Object Oriented / Class & Object.
    By jedmustdie in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 23rd, 2014, 10:21 PM
  2. Replies: 2
    Last Post: September 26th, 2013, 04:13 PM
  3. read & write object in object file
    By amirsarem in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 8th, 2013, 11:35 AM
  4. static variable accessible in object b, not in object a?
    By Pajaro in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 30th, 2013, 02:41 PM
  5. Reading from ResultSet to Object and from object Object Array
    By anmaston in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 7th, 2011, 06:11 AM