Skip to content

Commit

Permalink
Create aboutAnonymousObject
Browse files Browse the repository at this point in the history
A little bit about Anonymous Object
  • Loading branch information
me-jyotii committed Oct 12, 2020
1 parent ca40697 commit 2f9a11a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions aboutAnonymousObject
@@ -0,0 +1,27 @@
package anonymousObject;

class factorial{
void fact (int n) {
int fact =1;
for(int i = 1; i<=n; i++)
{

fact = fact*i;

}
System.out.print(fact);

}
}

public class Anonymous_me1 {

public static void main(String[] args) {

new factorial().fact(5);

}

}
//chaining of const
//should be on top

0 comments on commit 2f9a11a

Please sign in to comment.