C++ PROGRAMS FUNCTIONS DEFAULT ARGUMENTS CALL BY VALUE CALL BY REFERENCE CALL BY ADDRESS CLASSES AND OBJECTS CLASSES WITH PRIMITIVE...
Showing posts with label OOPS Lab. Show all posts
Showing posts with label OOPS Lab. Show all posts
HANDLING USER-DEFINED EXCEPTIONS
Java Programs Object Oriented Programming Lab OOPS Lab
SOURCE CODE: Exception.java import java.lang.Exception.*; class MyException extends Exception { MyException(String message) { super...
HANDLING PRE-DEFINED EXCEPTIONS
Java Programs Object Oriented Programming Lab OOPS Lab
SOURCE CODE: Exception.java public class Exception { public static void main(String args[]) { int a[]={5,10}; int b=5; try...
MULTI-THREADING
Java Programs Object Oriented Programming Lab OOPS Lab
SOURCE CODE: import java.lang.Thread; class A extends Thread { public void run() { for(int i=1;i<=5;i++) { if(i==1)yield(); Sys...
USER DEFINED INTERFACES
Java Programs Object Oriented Programming Lab OOPS Lab
SOURCE CODE: Interface.java interface Area { final static float PI=(float) 3.14; float compute(float x,float y); } class Rectang...
Subscribe to:
Posts (Atom)