Skip to content

Commit b87da2f

Browse files
authored
Merge pull request #4 from SoftgenAndoird/vineeth
Vineeth Practice project has been added
2 parents 49f29d5 + d4996d6 commit b87da2f

File tree

9 files changed

+125
-0
lines changed

9 files changed

+125
-0
lines changed

JavaVinith/.classpath

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

JavaVinith/.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>JavaVinith</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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.4
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=warning
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
11+
org.eclipse.jdt.core.compiler.source=1.3
1.67 KB
Binary file not shown.
684 Bytes
Binary file not shown.
1.12 KB
Binary file not shown.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package com.vinith.javabasic;
2+
3+
public class ClassExample {
4+
public int sum(int a, int b) {
5+
int c;
6+
c = a + b;
7+
return c;
8+
}
9+
10+
public int sub(int a, int b) {
11+
int c;
12+
c = a - b;
13+
return c;
14+
}
15+
16+
public float mul(float a, float b) {
17+
float c;
18+
c = a * b;
19+
return c;
20+
}
21+
22+
public double div(double a, double b) {
23+
double c;
24+
c = a / b;
25+
System.out.println("sdzfdsfd");
26+
return c;
27+
}
28+
29+
public boolean gre(int a, int b) {
30+
if (a > b)
31+
return true;
32+
return false;
33+
}
34+
35+
public static void main(String[] args) {
36+
ClassExample c = new ClassExample();
37+
System.out.println("sum is" + c.sum(1, 2));
38+
System.out.println("sub is" + c.sub(3, 2));
39+
System.out.println("mul is" + c.mul(1.12f, 2.32f));
40+
System.out.println("div is" + c.div(1, 2));
41+
System.out.println("ans is" + c.gre(3, 2));
42+
43+
}
44+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.vinith.javabasic;
2+
3+
public class loops {
4+
public static void main(String [] args)
5+
{
6+
int a=10;
7+
int b=20;
8+
do{
9+
a++;
10+
}while(a<=10);
11+
int i=1;
12+
switch(i)
13+
{
14+
case 1:
15+
if(a==11)
16+
{
17+
for(int j=0;j<10;j++)
18+
System.out.println(j);
19+
}
20+
}
21+
}
22+
23+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.vinith.javabasic;
2+
3+
import java.util.Scanner;
4+
5+
public class scannner {
6+
public static void main(String args[])
7+
{
8+
Scanner s = new Scanner(System.in);
9+
System.out.println("enter id");
10+
int id= s.nextInt();
11+
System.out.println("enter name");
12+
String name=s.next();
13+
System.out.println("enter exp");
14+
int exp=s.nextInt();
15+
System.out.println("enter branch");
16+
String branch=s.next();
17+
System.out.println("enter salary");
18+
int salary=s.nextInt();
19+
System.out.println("enter address");
20+
String address=s.next();
21+
s.close();
22+
}
23+
24+
}

0 commit comments

Comments
 (0)