Skip to content

Commit 78218af

Browse files
committed
exp update
1 parent 666822d commit 78218af

45 files changed

Lines changed: 534 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

EXPERIMENT1/.classpath

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-17.0.7.7-hotspot">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentry kind="src" path="src"/>
9+
<classpathentry kind="output" path="bin"/>
10+
</classpath>

EXPERIMENT1/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>EXPERIMENT1</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=17
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=17
1.19 KB
Binary file not shown.
1.35 KB
Binary file not shown.
1.05 KB
Binary file not shown.

EXPERIMENT1/bin/module-info.class

150 Bytes
Binary file not shown.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package EXPERIMENT1;
2+
3+
import java.io.*;
4+
class Deserial {
5+
public static void main(String args[]){
6+
try{
7+
FileInputStream fin = new FileInputStream("d:\\f.txt");
8+
ObjectInputStream in=new ObjectInputStream(fin);
9+
Student s1=(Student)in.readObject();
10+
Student s2=(Student)in.readObject();
11+
Student s3=(Student)in.readObject();
12+
Student s4=(Student)in.readObject();
13+
Student s5=(Student)in.readObject();
14+
15+
16+
System.out.println(s1);
17+
System.out.println(s2);
18+
System.out.println(s3);
19+
System.out.println(s4);
20+
System.out.println(s5);
21+
in.close();
22+
}catch(Exception e){
23+
System.out.println(e);
24+
}
25+
}
26+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package EXPERIMENT1;
2+
3+
import java.io.*;
4+
class Serial{
5+
public static void main(String args[]){
6+
try
7+
{
8+
Student s1 =new Student(1,"ram", 1000);
9+
Student s2 =new Student(2,"shyam", 2000);
10+
Student s3 =new Student(3,"mohan", 3000);
11+
Student s4 =new Student(4,"sohan", 4000);
12+
Student s5 =new Student(5,"mohan", 5000);
13+
FileOutputStream fout=new FileOutputStream("d:\\f.txt");
14+
ObjectOutputStream out=new ObjectOutputStream(fout);
15+
out.writeObject(s1);
16+
out.writeObject(s2);
17+
out.writeObject(s3);
18+
out.writeObject(s4);
19+
out.writeObject(s5);
20+
out.flush();
21+
out.close();
22+
System.out.println("success");
23+
}
24+
catch(Exception e){
25+
System.out.println(e);
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)