cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding static variable

Former Member
0 Kudos

Dear Experts

I want to define a static variable in my First View.Where can i place it?

It is urgent plz send me the solution.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If u want to make the static variable local to A View

Declare it as private in between

//@@begin others

//@@end

like

//@@begin others

private static final String str="text";

//@@end

Regards

LakshmiNarayana

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

At the end of the ,java file of the view you will see some annotations

as

//@@begin others

//@@end

place your code their

Ex:

//@@begin others

public static final int x=1; // final variable of type int.

//@@end

Regards

Ayyapparaj

Former Member
0 Kudos

At the end of the view you would have (under implementation tab)

//@@begin others

public static int i =0;

//@@end

Regards,

Murtuza