Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011
    Rep Power

    Default can tell any one the folloing out put

    Java Code:
    abstract class Glyph {
      abstract void draw();
      Glyph() {
        System.out.println("Glyph() before draw()");
        System.out.println("Glyph() after draw()");
    class RoundGlyph extends Glyph {
      private int radius = 1;
      RoundGlyph(int r) {
        radius = r;
        System.out.println(" radius******11111= " + radius);
      void draw() {
        System.out.println("RoundGlyph.draw(), radius = " + radius);
    public class MainClass {
      public static void main(String[] args) {
        new RoundGlyph(5);
    //wht is the out put of the radius******11111= value and how it will come tell any one.....
    Last edited by sunde887; 08-25-2011 at 05:03 PM. Reason: Added code tags, [code]...[/code]

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power


    That's not how this works. Is this homework? Did you try writing an example program that does this? Please see the link in my signature on asking questions the smart way before you post again.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Richmond, Virginia
    Blog Entries
    Rep Power


    As Kevin said, please make an attempt. Using intelligent language will also help us understand what you want. Currently I have very little idea what you are asking for. I also added code tags to your code and indented it all for you. Please don't just dump messy, unformatted code without code tags on the forums. I am also moving this to the new to Java forum. If from now on you are not sure where to post, it's safe to say it belongs in New to Java section.

    Again, I suggest you re state your question and tell us what exactly you don't understand.

Posting Permissions

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