This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 homeWork1; | |
| public class ChangeTheWolrd { | |
| public static void main(String[] args) { | |
| String s="Education is the most powerful weapon which you can use to change the world."; | |
| String t="An investment in knowledge pays the best interest."; | |
| System.out.print("\""+s.substring(s.indexOf("use"),s.indexOf("use")+"use".length())+" "+ |
This file contains hidden or 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 homeWork1; | |
| public class Namber { | |
| public static void main(String[] args) { | |
| double value=-7643546.0000004; | |
| String strValue=String.valueOf(value); | |
| long a=Long.valueOf(strValue.substring(0, strValue.indexOf("."))); | |
| long b=Long.valueOf(strValue.substring(strValue.indexOf(".")+1)); |
This file contains hidden or 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 homeWork1; | |
| public class DHMS { | |
| public static void main(String[] args) { | |
| long days =System.currentTimeMillis()/1000/60/60/24, | |
| hours =System.currentTimeMillis()/1000/60/60%24, | |
| minutes =System.currentTimeMillis()/1000/60%60, |