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
tomcat | |
start tomcat 9 manually | |
C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin | |
Tomcat9w -> start | |
checker - netstat -aon |find /i "listening" |find "8080" | |
killer - taskkill /F /P |
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
public static int sumFirstAndLastDigit(int number) { | |
int lastDigit; | |
int sum = 0; | |
if(number<0){ | |
return -1; | |
} | |
lastDigit = number % 10; | |
while (number > 9) {//this will give us last digit |
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
public class PlayingCat { | |
// write your code here | |
public static boolean isCatPlaying(boolean summer, int temperature){ | |
while (summer == false) { //if it is nut summer | |
if (!(temperature >= 25 && temperature <= 35)) { //setting temperature | |
return false; | |
}else { | |
return true; | |
} | |
} |
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
public class IntEqualityPrinter { | |
public static void printEqual(int num1, int num2, int num3){ | |
if(num1<0 || num2<0 || num3<0){ | |
System.out.println("Invalid Value"); | |
}else if(num1==num2 && num2==num3){ | |
System.out.println("All numbers are equal"); | |
}else if(num1!=num2 && num1!=num3 && num2!=num3){ | |
System.out.println("All numbers are different"); | |
}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
public class MinutesToYearsDaysCalculator { | |
public static void printYearsAndDays(long minutes){ | |
if (minutes < 0) { | |
System.out.println("Invalid Value"); | |
}else { | |
// make to understand process easy, I go step by step | |
long hour = minutes / 60; //simple find first hours | |
long day = hour / 24; // then go for days | |
long year = day / 365; //then find a years | |
long remaindays= day%365; //then go for remaining days, so, after some years how many days left we will see |
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
/** | |
* Create a method called calcFeetAndInchesToCentimetres, it needs to have 2 parameters (feet, inches). | |
* | |
* You should validate that the first parameter feet is >= 0 | |
* You should validate that the second parameter inches is >= 0 and <= 12 | |
* return -1 from the method if either of the above is not true. | |
* | |
* If the parameters are valid, then calculate how many centimeters comprise the feet and inches passed | |
* to this method and return that value. | |
* |