• sachin24
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

Hi,

i want to call inner class member in Apex , A very simple code i was trying to run:

 

public class Outer

{

  class Inner

    {

      public void show()

        {

             System.debug('Hello');

        }

   }

}

When i tries to call the show() of inner class in developer console with the below statement:

new Outer().new Inner().show();

Then after clicking execute button i m getting unexpected token 'new' error.

however the above code is working in fine in Java, i m new to apex, could you help me please

Hi,

i want to call inner class member in Apex , A very simple code i was trying to run:

 

public class Outer

{

  class Inner

    {

      public void show()

        {

             System.debug('Hello');

        }

   }

}

When i tries to call the show() of inner class in developer console with the below statement:

new Outer().new Inner().show();

Then after clicking execute button i m getting unexpected token 'new' error.

however the above code is working in fine in Java, i m new to apex, could you help me please

Hello I am new to Apex / Trigger and would like to use it to update one field from another on a custom object. I know this can be done via workflow but would like to try this with  a trigger so I can start to understand more about Apex. I am in the mids of reading about apex etc but would be grateful if someone could give me a few examples.

 

What I am trying to achieve:

 

Object name = Test object

 

Field 1 = A

 

Field 2 = B

 

All I want to do is make "field A" update with "field B" value after update.

 

Thank you