-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring1.java
More file actions
23 lines (20 loc) · 790 Bytes
/
string1.java
File metadata and controls
23 lines (20 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import java.util.Scanner;
public class string1{
public static void main(String args[])
{
String str;
str=new String("Aniket varkhade ");
System.out.println(str);
String name="aniket varkhade ";
// System.out.println(name+"1 ");
// System.out.print(name+"2 ");
// System.out.print("another print func+3 ");
// System.out.printf("%s is your string 4 ",str);
// System.out.format("%s is your string 5 ",str);
// System.out.println("enter your string :");
// Scanner sc= new Scanner(System.in);
// str=sc.nextLine();
// str=sc.next(); it takes only single word encountered after space
// System.out.println("\n string is typed by you is :"+str);
}
}