Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to get string input line in java

class me{
    public static void main(String[] args) {
        name();
    }
    public static void name(){
        Scanner input = new Scanner(System.in);
        System.out.print("Enter your name :");
        String full_name = input.nextLine();
        System.out.println("hi "+ full_name+", Welcome back !");
    }
Comment

PREVIOUS NEXT
Code Example
Java :: Java get color from rgb values 
Java :: Java LogManager 
Java :: java run jar with args 
Java :: FlutterSound.java uses or overrides a deprecated API. 
Java :: java string equal 
Java :: android get string value 
Java :: java for item in array 
Java :: color class android 
Java :: java.lang.IllegalStateException: Could not obtain identifier 
Java :: Java How to use Queue? 
Java :: how to add arms to armor stands 1.16 Java Edition 
Java :: How to merge two sorted arrays? 
Java :: pass a list of string as PathVariable to api spring boot 
Java :: .entrySet 
Java :: ClassNotFoundException: org.springframework.ui.freemarker.FreeMarkerConfigurationFactory 
Java :: android text change java debounce 
Java :: array list vs vector 
Java :: how to return the first character in an array from a method java 
Java :: display two dimensional array java 
Java :: split string into array java 
Java :: make quotation a string 
Java :: difference between maven plugin and dependency 
Java :: arc() method from the processing library 
Java :: . Java Program to Delete the Specified Integer from an Array 
Java :: java use space in enums 
Java :: take a peice from array java 
Java :: kotlin edittext default value 
Java :: update java windows 
Java :: fill array java 
Java :: selenium java control + enter 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =