diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 1.pdf b/CCVT_Code_Distribute/Lecture Files/Lecture 1.pdf deleted file mode 100644 index 104eeb7..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture 1.pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 2.pdf b/CCVT_Code_Distribute/Lecture Files/Lecture 2.pdf deleted file mode 100644 index 7c3719d..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture 2.pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 5 (Exception).pdf b/CCVT_Code_Distribute/Lecture Files/Lecture 5 (Exception).pdf deleted file mode 100644 index 3477bad..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture 5 (Exception).pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 7Cloning Theory.txt b/CCVT_Code_Distribute/Lecture Files/Lecture 7Cloning Theory.txt deleted file mode 100644 index e69de29..0000000 diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 8(String & Wrapper).pdf b/CCVT_Code_Distribute/Lecture Files/Lecture 8(String & Wrapper).pdf deleted file mode 100644 index bc8d9b6..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture 8(String & Wrapper).pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture 9 (Strings).ppt b/CCVT_Code_Distribute/Lecture Files/Lecture 9 (Strings).ppt deleted file mode 100644 index fe2ac34..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture 9 (Strings).ppt and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture3.pdf b/CCVT_Code_Distribute/Lecture Files/Lecture3.pdf deleted file mode 100644 index e3f293f..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture3.pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture4.pdf b/CCVT_Code_Distribute/Lecture Files/Lecture4.pdf deleted file mode 100644 index e9dc7a9..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture4.pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/Lecture6 (inheritance and Interface) .pdf b/CCVT_Code_Distribute/Lecture Files/Lecture6 (inheritance and Interface) .pdf deleted file mode 100644 index 8a2eb2e..0000000 Binary files a/CCVT_Code_Distribute/Lecture Files/Lecture6 (inheritance and Interface) .pdf and /dev/null differ diff --git a/CCVT_Code_Distribute/Lecture Files/References b/CCVT_Code_Distribute/Lecture Files/References deleted file mode 100644 index 7ca4ca1..0000000 --- a/CCVT_Code_Distribute/Lecture Files/References +++ /dev/null @@ -1 +0,0 @@ -Most of the data taken from Oracle Java Docs, For further Reading visit : https://docs.oracle.com/javase/tutorial/ diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Employee.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Employee.java deleted file mode 100644 index 880f3a8..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Employee.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.rt.exceptionexamples; - -public class Employee { - - - int id; - String name; - public Employee(int id, String name) { - super(); - this.id = id; - this.name = name; - } - - @Override - public String toString() { - // TODO Auto-generated method stub - return "Employee Id"+id+" Employee Name:"+name; - } - - - -} diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception10.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception10.java deleted file mode 100644 index c533650..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception10.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception10 { -// Through an exception out of the method. -static void procA() { -try { -System.out.println("inside procA"); -throw new RuntimeException("demo"); -} finally { -System.out.println("procA's finally"); -} -} -// Return from within a try block. -static void procB() { -try { -System.out.println("inside procB"); -return ; -} finally { -System.out.println("procB's finally"); -} -} -static void procC() { -try { -System.out.println("inside procC"); -System.exit(0); -} finally { -System.out.println("procC's finally"); -} -} -public static void main(String args[]) { -try { -procA(); -} catch (Exception e) { -System.out.println("Exception caught"); -} -procB(); -procC(); -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception11.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception11.java deleted file mode 100644 index 97d0144..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception11.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.rt.exceptionexamples; - -class MyException extends RuntimeException { -private int detail; -MyException(int a) { -detail = a; -} -public String toString() { -return "MyException[" + detail + "]should be less than 10"; -} -} -class Exception11 { -static void compute(int a) { -System.out.println("Called compute(" + a + ")"); -if(a > 10) -throw new MyException(a); -System.out.println("Normal exit"); -} -public static void main(String args[]) { - -compute(1); -compute(20); -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception2.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception2.java deleted file mode 100644 index 926a17a..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception2.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception2 { -public static void main(String args[]) { -int d, a; - -try { // monitor a block of code. -d = 1; -a = 42 / d; -int a1[]=new int[10]; -a1[11]=21; -System.out.println("This will not be printed."); -//throw new IllegalAccessException(); -} catch (ArithmeticException e) { // catch divide-by-zero error -System.out.println("Division by zero."); -} -catch(ArrayIndexOutOfBoundsException e) -{ - System.out.println("Array error"); -} - -catch(Exception o) -{ - System.out.println("Super Exception"); -} - -System.out.println("After catch statement."); -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception3.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception3.java deleted file mode 100644 index df55f56..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception3.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception3 { -public static void main(String args[]) { -try { -int a = args.length; -System.out.println("a = " + a); -int b = 42 / a; -int c[] = { 1 }; -c[42] = 99; -} catch(ArithmeticException e) { -//System.out.println("Divide by 0: " + e.toStri); - e.printStackTrace(); - -} catch(ArrayIndexOutOfBoundsException e) { -System.out.println("Array index oob: " + e); -} -System.out.println("After try/catch blocks."); -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception4.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception4.java deleted file mode 100644 index 9e33fe2..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception4.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception4 { -public static void main(String args[]) { -try { -int a = 0; -int b = 42 / a; -} catch(ArithmeticException e) { // ERROR - unreachable - System.out.println("This is never reached."); - } -catch(Exception e) { -System.out.println("Generic Exception catch."); -} - -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception5.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception5.java deleted file mode 100644 index cdea353..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception5.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception5 { -public static void main(String args[]) { -try { -int a = args.length; - -int b = 42 / a; -System.out.println("a = " + a); - -if(a==1) a = a/(a-a); -if(a==2) { -int c[] = { 1 }; -c[42] = 99; -} -} catch(Exception e) { -System.out.println("Array index Out-of-bounds: " + e); - -} -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception6.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception6.java deleted file mode 100644 index f788e2f..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception6.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception6 { -static void nesttry(int a) { -try { -if(a==1) a = a/(a-a); -if(a==2) { -int c[] = { 1 }; -c[42] = 99; -} -} catch(ArrayIndexOutOfBoundsException e) { -System.out.println("Array index out-of-bounds: " + e); -} -} -public static void main(String args[]) { -try { -int a = 2; -int b = 42 / a; -System.out.println("a = " + a); -nesttry(a); -} catch(ArithmeticException e) { -System.out.println("Divide by 0: " + e); -} -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception7.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception7.java deleted file mode 100644 index 6e71309..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception7.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.rt.exceptionexamples; - -import java.io.IOException; - -class Exception7 { -static void demoproc() throws IOException { -throw new IOException();//("demo"); - -} - -public static void main(String args[]) throws IOException { - -demoproc(); - -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception8.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception8.java deleted file mode 100644 index 1f924bc..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception8.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception8 { -static void throwOne() throws IllegalAccessException { -System.out.println("Inside throwOne."); -throw new IllegalAccessException("demo"); -//throw new ArithmeticException(); -} -public static void main(String args[]) { -try { - throwOne(); -} catch (IllegalAccessException e) { - // TODO Auto-generated catch block - System.out.println("Got it"+e.getMessage()); -} -} -} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception9.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception9.java deleted file mode 100644 index 10e398c..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Exception9.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.rt.exceptionexamples; - -class Exception9 { -static void throwOne() { -System.out.println("Inside throwOne."); -try { - throw new IllegalAccessException("demo"); -} catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); -} -} -public static void main(String args[]) { - -throwOne(); - -}} \ No newline at end of file diff --git a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Test.java b/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Test.java deleted file mode 100644 index 4926b7b..0000000 --- a/CCVT_Code_Distribute/src/com/rt/exceptionexamples/Test.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.rt.exceptionexamples; - -public class Test { - - public static void main(String[] args) { - // TODO Auto-generated method stub - - Employee e1=new Employee(1, "Ram"); - System.out.println(e1.toString()); - -// System.out.println(e1.getClass()); -// System.out.println(e1.hashCode()); - - } - -} diff --git a/CCVT_Code_Distribute/src/com/rt/string/forStrings.java b/CCVT_Code_Distribute/src/com/rt/string/forStrings.java deleted file mode 100644 index dffed12..0000000 --- a/CCVT_Code_Distribute/src/com/rt/string/forStrings.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.rt.string; -import java.util.StringTokenizer; - -import com.rt.cloning.Employee; - - -public class forStrings { - - /** - * @param args - */ - public static void main(String[] args) { - char ch[]={'h','e','l','l','o'}; - - System.out.println(ch); - - String str=new String(ch); - System.out.println(str); - - System.out.println(str.equals(ch)); - - - String s1="Example of being immutable"; - String s2="Example of being immutable";// - System.out.println("Checking s1 & s2 "+(s1==s2)); - - String s3=new String("Example of being immutable");// - System.out.println("checking s1 & s3 "+(s1==s3)); - System.out.println("Checking s1 & s2"+s1.equals(s2)+"\nchecking s1 & s3"+s1.equals(s3)); - - System.out.println(s1.compareTo(s2)); - System.out.println(s1.compareTo(s3)); - - - s3=s3.intern(); - System.out.println("checking s1 & s3 "+(s1==s3)); - - String s41="abc"; - String s51="abc"; - String s61="abcdef"; - System.out.println(s41==s51);//true - String s71=new String("abc"); - s71=s71+"def"; - System.out.println(s71);//abcdef - System.out.println(s61);//abcdef -// s71=s71.intern(); - System.out.println(s61==s71);//false - //s51.concat("def");System.out.println("hghgj"+s51); - StringBuffer tt=new StringBuffer("abc"); - tt.append("defssss"); - - System.out.println(tt); - - - - - - - //String s1="Example of being immutable"; - System.out.println(s1.charAt(2)); - System.out.println(s1.length()); - System.out.println(s1.format("Hey there %d and %d results in %d", 2,3,5)); - System.out.println(s1.substring(4)); - System.out.println(s1.substring(4, 9)); - System.out.println(s2.substring(0, 1));//start index end index - System.out.println(s1.contains("bein")); - System.out.println(s1.isEmpty()); - - String s4="Hi this is"; - String s5="CCVT at UPES"; - String s6=s4+s5;// String s6=(new StringBuilder()).append(s4).append(s5).toString(); - System.out.println(s6); - s4.concat(s5);//being immutable - System.out.println(s4); - s4=s4.concat(s5); - System.out.println(s4); - - s1.replace('o', 'q'); - System.out.println(s1); - - s1=s1.replace("being", "not"); - System.out.println(s1); - String s7=" after 5 space"; - System.out.println(s7); - System.out.println(s7.trim()); - - System.out.println(s1.toLowerCase()); - System.out.println(s1.toUpperCase()); - - System.out.println(s1.startsWith("Ex")); - System.out.println(s1.endsWith("le")); - - int a=10; - String s8=String.valueOf(a); - - System.out.println(s8+12); - - - ////******************STRING BUFFER - /* - */ - System.out.println("****************STRING BUFFER NOW***************"); - StringBuffer sf1=new StringBuffer();//can be passed with int or string -//sf1.append("aaaaaaaaaaaaaaaaa"); - System.out.println(sf1.capacity()+""+sf1); - sf1.append("few string to append"); - System.out.println(sf1); - sf1.insert(0, "see more appended "); - System.out.println(sf1); - sf1.replace(0, 8, "deleted"); - System.out.println(sf1); - sf1.delete(0, 7); - System.out.println(sf1); - sf1.reverse(); - System.out.println(sf1); -// sf1.ensureCapacity(50); - System.out.println(sf1.capacity()); - - StringBuilder sb1=new StringBuilder();//can be passed with int or string - - sb1.reverse(); - System.out.println(sb1.capacity()+""+sb1); - sb1.append("few string to append"); - System.out.println(sb1); - sb1.insert(0, "see more appended "); - System.out.println(sb1); - sb1.replace(0, 8, "deleted"); - System.out.println(sb1); - sb1.delete(0, 7); - System.out.println(sb1); - sb1.reverse(); - System.out.println(sb1); -// sb1.ensureCapacity(500); - System.out.println(sb1.capacity()); - - - // toString method tgo be explained - String s9="This, string, will, be, tokenized"; - StringTokenizer stk=new StringTokenizer(s9,"s"); - while(stk.hasMoreTokens()) - { - System.out.println(stk.nextToken()); - } - - String s10[]=s9.split(","); - System.out.println(s10.length); - System.out.println(s10[0]+" XX"+s10[1]+" XX"+s10[2]); - - - - - // TODO Auto-generated method stub - - } - -} diff --git a/README.md b/README.md index e2c2771..1b08940 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,2 @@ -## Welcome to My Repository - -Hey There! This is **Ravi Tomar**, An **E**ngineer, An **A**cadmecian & a **H**elping hand, Working under capacity of Assistant Professor at University of Petroleum & Energy Studies, Dehradun - -### Use this Repository to learn basics of Java language - - +# Java_Programming_CCVT +This is for distribution of Lecture code to my students... diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c419263..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file