This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class FirstMetod { | |
public static void main(String[] args) { | |
hello("Java!"); | |
} | |
static void hello(String name) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class MetodSum { | |
public static void main(String[] args) { | |
double num1=6728.00008; | |
double num2=4590.56; | |
sum(num1,num2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class MetodSquare { | |
public static void main(String[] args) { | |
double number=2.0; | |
System.out.println(number+"^2"+"="+square(number)); | |
System.out.println(number+"^4"+"="+square(square(number))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class MetodSquare { | |
public static void main(String[] args) { | |
double number1=2.0; | |
int number2=4; | |
System.out.println(number1+"^2"+"="+square(number1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Old { | |
public static void main(String[] args) { | |
int age=212; | |
if(age>150 || age<=0) | |
System.out.println("Age are not correct"); | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Min { | |
public static void main(String[] args) { | |
int a=7,b=-2, c =7; | |
System.out.println("Minimum = " + min(a,b,c)); | |
a=-23; b=-2; c =9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Min { | |
public static void main(String[] args) { | |
int a=7,b=-2, c =7; | |
System.out.println("Minimum"+"("+a+"," +b+","+c+")"+"= " + min(a,b,c)); | |
a=-23; b=-2; c =9; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Spring { | |
public static void main(String[] args) { | |
int month=3; | |
System.out.println("Month = "+ month); | |
if(isSpring(month)==1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Quadrant { | |
public static void main(String[] args) { | |
System.out.println(getQuadrant("a","1")); | |
System.out.println(getQuadrant("a","2")); | |
System.out.println(getQuadrant("b","3")); | |
System.out.println(getQuadrant("i","9")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metod; | |
public class Coordinats { | |
public static void main(String[] args) { | |
printCoordinats("a","1"); | |
printCoordinats("c","2"); | |
printCoordinats("i","9"); | |
printCoordinats("e","5"); |