In C# .net there is a provision to have two different class files and make them a single class using the keyword partial keyword.this helps it to keep [for ex]UI and logic seperate.
of course we can have two classes to achieve this one for UI and other for logic.
Can this be achieved in java some how?
In C# .net there is a provision to have two different class files and
Share
On source file splitting
No. Java source codes can not be split across multiple files.
From the Wikipedia article Comparison of Java and C Sharp
On separating logic and UI into their own classes
The two classes approach is a much better solution than the one-class-two-source approach in this case, because the separation is enforced in the design, not just physical separation in the source codes.
See also