Results 1 to 5 of 5
  1. #1
    blerimz is offline Member
    Join Date
    Feb 2014
    Posts
    9
    Rep Power
    0

    Default How do i call print() method ?

    public class KlasaOut {
    abstract class KlasaIn {
    int vlera = 20;
    public void print(){
    System.out.println("Vlera = "+getVlera());
    }

    public abstract int getVlera();
    }
    }


    Offer KlasaMain class which has the main method where i must call print method of the inner class instance KlasaIn ?

    Could somebody help me out

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,050
    Rep Power
    6

    Default Re: How do i call print() method ?

    That would depend on your requirements. In stead of posting a tiny snippet of code, post all relevant code and post what you want to achieve.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    blerimz is offline Member
    Join Date
    Feb 2014
    Posts
    9
    Rep Power
    0

    Default Re: How do i call print() method ?

    thats all i have . Its a question from a test .

    sorry for that

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,050
    Rep Power
    6

    Default Re: How do i call print() method ?

    What a shitty test then, the question is very much incomplete.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    blerimz is offline Member
    Join Date
    Feb 2014
    Posts
    9
    Rep Power
    0

    Default Re: How do i call print() method ?

    How do i call  print() method ?-untitled1.png

    i have translated from albanian language to english

Similar Threads

  1. Replies: 6
    Last Post: 06-21-2013, 03:42 PM
  2. call a method from another method in same class
    By rockstaedy in forum New To Java
    Replies: 5
    Last Post: 10-03-2012, 02:42 PM
  3. call a JSP method
    By sauravsinha in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 09-26-2011, 04:19 PM
  4. How to call this method?
    By Rockefella in forum New To Java
    Replies: 12
    Last Post: 01-20-2011, 04:32 PM
  5. cannot call private method from static method
    By jon80 in forum New To Java
    Replies: 3
    Last Post: 05-07-2008, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •