import java.io.*; import java.util.*; public class Main<T>{ public void print(T element){ System.out.println(element); } public static void main(String args[]) throws Exception { //Fill your code Scanner sc=new Scanner(System.in); Main <String>m1=new Main<>(); System.out.println("Enter the input:"); String s=sc.nextLine(); m1.print(s); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter