Java Programming (314317)
Click on Above Button To Download Syllabus of Java Programming (314317)
About CO4K Syllabus
In the fourth semester of the MSBTE diploma in Computer Engineering (CO) students will appear for MSBTE theory exams of 70 marks for three subjects - Java Programming, Data Communication & Computer Network and Microprocessor. MSBTE's Online exam of 70 marks for one subject - Environment Education & Sustainability. External MSBTE practical exam of 25 marks for Python Programming. Internal MSBTE practical exam of 25 marks for User Interface & Design. More emphasis is given on a practical-oriented study approach.
As you all know, the curriculum for MSBTE's K scheme makes passing simple. According to the K Scheme Curriculum of MSBTE, the minimum passing score is 40 out of 100. The K Scheme Curriculum at MSBTE uses a 30-70 mark assessment for a total of 100 marks, where the theory assessment is based on formative (FA-TH) and summative (SA-TH) evaluations. FA-TH represents the average of two class tests of 30 marks each conducted during the semester at the institute. SA-TH represents the theory paper with 70 marks conducted by MSBTE at the end of the semester. MSBTE has revised the curriculum of the Diploma, called the 'K' Scheme Curriculum, for the academic year 2023-24. MSBTE has officially announced the second semester curriculum in the month of November 2023. MSBTE has displayed the draft curriculum until the sixth semester, and the syllabus for all third and fourth semesters is now available. Now students will learn more technical subjects from the second year onward.
Questions And Answers
| String | String Buffer |
|---|---|
| String is a major class | String Buffer is a peer class of String |
| Length is fixed (immutable) | Length is flexible (mutable) |
| Contents of object cannot be modified | Contents of object can be modified |
| Object can be created by assigning String constants enclosed in double quotes. | Objects can be created by calling constructor of String Buffer class using “new” |
| Ex:- String s = "abc"; | Ex:- StringBuffer s = new StringBuffer("abc"); |
Some Notes for Java Programming
public class FirstJava
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
public class FirstJavaProgram
{
public static void main(String args[])
{
for(int i=1;i<=5;i++)
{
System.out.println("Show count i="+i);
}
}
}
*
* *
* * *
* * * *
public class Pattern1
{
public static void main(String args[])
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print("* ");
}
System.out.println();
}
}
}
(When we run this program we need to pass arguments in command line while running the program
Like This -> java CommandLineArguments1 77 88)
public class CommandLineArguments1
{
public static void main(String args[])
{
int x = Integer.parseInt(args[0]);
int y = Integer.parseInt(args[1]);
int c = x + y;
System.out.println("addition of numbers:" + c);
}
}
/* GCD of two numbers using Java */
import java.util.*;
public class GCD
{
public static void main(String args[])
{
int num1,num2,g,i;
Scanner sc = new Scanner(System.in);
System.out.println("Greatest Common Division (GCD) ");
System.out.print("Enter 1st number = ");
num1=sc.nextInt();
System.out.print("Enter 2nd number = ");
num2=sc.nextInt();
g=gcd(num1,num2);
System.out.println("\nGCD of "+num1+" and "+num2+" = "+g);
}
public static int gcd(int a,int b)
{
while(a!=b)
{
if(a>b)
{
return gcd((a-b),b);
}
else
{
return gcd(a,(b-a));
}
}
return a;
}
}
import java.util.*;
class Employee
{
int eid;
String ename;
double salary;
public Employee(int eid,String ename,double salary)
{
this.eid=eid;
this.ename=ename;
this.salary=salary;
}
public void display()
{
System.out.println(" Empid = "+eid+"\n Ename = "+ename+"\n Salary = "+salary);
}
}
class EmpMaster
{
public static void main(String args[])
{
/* Employee emp1=new Employee(1111,"Soham",25000);
emp1.display(); */
Scanner s1=new Scanner(System.in);
int i;
System.out.print("Enter no. of Employee Details you want to enter = ");
int n=s1.nextInt();
Employee emp[]=new Employee[n];
for(i=0;i<n;i++)
{
System.out.println("\nEnter Details of Employee "+(i+1));
System.out.print("Employee ID = ");
int d1=s1.nextInt();
System.out.print("Employee Name = ");
String d2=s1.next();
System.out.print("Employee Salary = ");
double d3=s1.nextDouble();
emp[i]=new Employee(d1,d2,d3);
}
for(i=0;i<n;i++)
{
System.out.println("\nDetails of Employee "+(i+1));
emp[i].display();
}
}
}
import java.io.*;
public class javacmd2
{
public static void main(String args[])
{
int sum=0,a;
for(int i=0;i<args.length;i++)
{
a=Integer.parseInt(args[i]);
sum=sum+a;
}
System.out.println("Addition = "+sum);
}
}
import java.util.Scanner;
class java3
{
public static void main(String args[])
{
int a,r;
Scanner sc=new Scanner(System.in);
System.out.print("Enter value = ");
a=sc.nextInt();
r=fact(a);
System.out.println("Factorial of "+a+" = "+r);
}
public static int fact(int n)
{
if(n==1)
{
return 1;
}
else
{
return (n*fact(n-1));
}
}
}
Write a program to implement multidimensional array. -- Link

0 Comments
Hi, Viewers Do not Enter Spam Messages in comments