On Nov 25, 9:12*am, tobleron <bud...@yahoo.com> wrote:
> Hi,
>
> I have 2 files.
>
> File A.java
>
> public class A {
> * *@Action public void bla1(){
> * * * blaaa1111....
> * *}
> * *@Action public void bla2(){
> * * * blaaa2222....
> * *}
>
> }
>
> File B.java
>
> public class B {
> * *public static void ble1(){
> * * * bleee1111....
> * *}
> * *public static void ble2(){
> * * * bleee2222....
> * *}
> * *public static void ble3(){
> * * * bleee3333....
> * *}
>
> }
>
> What I want to do is move ble1, ble2, ble3 into bla1. Just like this :
>
> public class A {
> * *@Action public void bla1(){
> * * * public static void ble1(){
> * * * * *bleee1111....
> * * * }
> * * * public static void ble2(){
> * * * * *bleee2222....
> * * * }
> * * * public static void ble3(){
> * * * * *bleee3333....
> * * * }
> * *}
>
> * *@Action public void bla2(){
> * * * blaaa2222....
> * *}
>
> }
>
> Java IDE will reject it. How to solve ? Thank you in advance.
In Java, I think this is usually solved with inner classes.
However, I would think it might just be better to declare ble* as
private methods in class A rather than make them methods in inner
classes declared in bla1
|