11
2- /* JAVA FUNCTIONS
2+ /* JAVA FUNCTIONS */
33
44import java .util .*;
55public class JFunction {
@@ -22,12 +22,12 @@ public static void main(String args[]){
2222 int sum = calculatesum (a ,b ); //here the varible sum is diffent from the above one coz its stored in another function.
2323 printHelloWorld ();
2424 }
25- }*/
25+ }
2626
2727
2828/* CALL BY VALUE */
2929
30- /* PRODUCT OF TWO NOS
30+ /* PRODUCT OF TWO NOS */
3131
3232public class JFunction {
3333 public static int multiply (int a ,int b ){
@@ -41,9 +41,9 @@ public static void main(String args[]){
4141 int product = multiply (x ,y );
4242 System .out .print ("The product = " + product );
4343 }
44- } */
44+ }
4545
46- /* FACTORIAL OF N
46+ /* FACTORIAL OF N */
4747import java .util .*;
4848public class JFunction {
4949
@@ -91,11 +91,11 @@ public static void main(String args[]){
9191 int bincoff = bincoff (n ,r );
9292 System .out .print ("The Binomial Co-efficient is : " + bincoff );
9393 }
94- }*/
94+ }
9595
9696 /* FUNCTIONAL OVERLOADING
9797
98- Diff No of Parameters
98+ Diff No of Parameters*/
9999
100100public class JFunction {
101101 public static int sum (int a , int b ){
@@ -114,7 +114,7 @@ public static void main(String args[]){
114114
115115 }
116116}
117- Different type
117+ // Different type
118118
119119public class JFunction {
120120 public static int sum (int a , int b ){
@@ -129,11 +129,11 @@ public static void main(String args[]){
129129 System .out .println (sum (4 ,8 ));
130130 System .out .print (sum (4.2f ,8.6f ));
131131 }
132- }*/
132+ }
133133
134134 /* IS PRIME NORMAL & OPTIMISED CASE */
135135
136- /* NORMAL
136+ /* NORMAL */
137137
138138public class JFunction {
139139 public static boolean isPrime (int n ){
@@ -154,9 +154,9 @@ public static void main(String args[]){
154154 System .out .print (isPrime (1 ));
155155 }
156156
157- }*/
157+ }
158158
159- /* OPTIMISED
159+ /* OPTIMISED */
160160
161161//import java.math.*;
162162public class JFunction {
@@ -208,7 +208,7 @@ public static void main(String args[]){
208208 primeInRange (100 );
209209 }
210210}
211- /* Binary to Decimal
211+ /* Binary to Decimal*/
212212
213213public class JFunction {
214214 public static int binaryToDecimal (int binNum ){
0 commit comments