-
-
Save mariiaKolokolova/8256e367aaa3d544f62f12c6556cd31e to your computer and use it in GitHub Desktop.
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 maricka.kolokolova; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Input string value:"); | |
String str = sc.nextLine(); | |
System.out.println("Input integer value:"); | |
int integer = sc.nextInt(); | |
System.out.println("Input double value:"); | |
double dbl = sc.nextDouble(); | |
System.out.println("Your result: " + concatenate(str, integer, dbl)); | |
sc.close(); | |
} | |
static String concatenate(String str, int num, double db) { | |
String rezult = str + (num + db); | |
return rezult; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment