-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc8f47a
commit aa08a13
Showing
28 changed files
with
1,576 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import java.util.*; | ||
|
||
class Program486 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Scanner sobj = new Scanner(System.in); | ||
|
||
System.out.println("Enter string"); | ||
String str = sobj.nextLine(); | ||
|
||
String newstr = str.trim(); | ||
|
||
String Arr[] = newstr.split(" "); | ||
|
||
System.out.println("Number of words are : "+Arr.length); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import java.util.*; | ||
|
||
class Program487 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Scanner sobj = new Scanner(System.in); | ||
|
||
System.out.println("Enter string"); | ||
String str = sobj.nextLine(); | ||
|
||
String data = str.replaceAll("\\s+"," "); | ||
|
||
String newstr = data.trim(); | ||
|
||
String Arr[] = newstr.split(" "); | ||
|
||
System.out.println("Number of words are : "+Arr.length); | ||
} | ||
} |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import java.util.*; | ||
|
||
class Program488 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Student obj1 = new Student("Vaibhav",89); | ||
Student obj2 = new Student("Arshu",89); | ||
|
||
obj1.Display(); | ||
obj2.Display(); | ||
} | ||
} | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public int Rollno; | ||
|
||
public Student(String str , int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import java.util.*; | ||
|
||
class Program489 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Student obj1 = new Student("Vaibhav",89); | ||
Student obj2 = new Student("Arshu",89); | ||
|
||
obj1.Display(); | ||
obj2.Display(); | ||
} | ||
} | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public static int Rollno; | ||
|
||
static | ||
{ | ||
Rollno = 0; | ||
} | ||
public Student(String str , int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
Rollno++; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Roll No : "+Rollno+" Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import java.util.*; | ||
|
||
class Program490 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Student obj1 = new Student("Vaibhav",89); | ||
Student obj2 = new Student("Madhuri",91); | ||
Student obj3 = new Student("Khushal",80); | ||
|
||
obj1.Display(); | ||
obj2.Display(); | ||
obj3.Display(); | ||
} | ||
} | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public int Rollno; | ||
|
||
public static int Generator; | ||
|
||
static | ||
{ | ||
Generator = 0; | ||
} | ||
public Student(String str , int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
Generator++; | ||
this.Rollno = Generator; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Roll No : "+Rollno+" Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import java.util.*; | ||
|
||
class Program491 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
Student obj1 = new Student("Vaibhav",89); | ||
Student obj2 = new Student("Madhuri",91); | ||
Student obj3 = new Student("Khushal",80); | ||
|
||
obj1.Display(); | ||
obj2.Display(); | ||
obj3.Display(); | ||
} | ||
} | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public int Rollno; | ||
|
||
public static int Generator; | ||
|
||
static | ||
{ | ||
Generator = 0; | ||
} | ||
public Student(String str , int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
Generator++; | ||
this.Rollno = Generator; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Roll No : "+Rollno+" Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
||
class DBMS | ||
{ | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import java.util.*; | ||
|
||
class Program492 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
LinkedList <Integer>obj = new LinkedList(); | ||
|
||
obj.add(11); | ||
obj.addLast(897); | ||
obj.add(21); | ||
obj.add(51); | ||
obj.remove(); | ||
|
||
System.out.println("Data is "+obj); | ||
|
||
for (int no : obj) | ||
{ | ||
System.out.println(no); | ||
} | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import java.util.*; | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public int Rollno; | ||
|
||
public static int Generator; | ||
|
||
static | ||
{ | ||
Generator = 0; | ||
} | ||
|
||
public Student(String str, int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
Generator++; | ||
this.Rollno = Generator; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Roll No : "+Rollno+" Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
||
class DBMS | ||
{ | ||
public LinkedList <Student> lobj; | ||
|
||
public DBMS() | ||
{ | ||
lobj = new LinkedList(); | ||
} | ||
|
||
public void StartDBMS() | ||
{ | ||
System.out.println("Marvellous Customised DBMS started succesfully..."); | ||
} | ||
} | ||
|
||
class Program493 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
DBMS dobj = new DBMS(); | ||
|
||
dobj.StartDBMS(); | ||
|
||
} | ||
} |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import java.util.*; | ||
|
||
class Program494 | ||
{ | ||
public static void main(String Arg[]) | ||
{ | ||
DBMS dobj = new DBMS(); | ||
|
||
dobj.StartDBMS(); | ||
|
||
dobj.Insert("Vaibhav",90); | ||
dobj.Insert("Madhuri",96); | ||
dobj.Insert("Khushal",80); | ||
dobj.Insert("Virat",67); | ||
|
||
} | ||
} | ||
|
||
class Student | ||
{ | ||
public String Sname; | ||
public int Marks; | ||
public int Rollno; | ||
|
||
public static int Generator; | ||
|
||
static | ||
{ | ||
Generator = 0; | ||
} | ||
|
||
public Student(String str, int no) | ||
{ | ||
this.Sname = str; | ||
this.Marks = no; | ||
Generator++; | ||
this.Rollno = Generator; | ||
} | ||
|
||
public void Display() | ||
{ | ||
System.out.println("Roll No : "+Rollno+" Name : "+Sname+" Marks : "+Marks); | ||
} | ||
} | ||
|
||
class DBMS | ||
{ | ||
public LinkedList <Student> lobj; | ||
|
||
public DBMS() | ||
{ | ||
lobj = new LinkedList(); | ||
} | ||
|
||
public void StartDBMS() | ||
{ | ||
System.out.println("Marvellous Customised DBMS started succesfully..."); | ||
} | ||
|
||
public void Insert(String str, int no) | ||
{ | ||
Student sobj = new Student(str, no); | ||
lobj.add(sobj); | ||
} | ||
} |
Oops, something went wrong.