JAVA7.0 Tutorial

OAKJAVA7(JAVA7.0) Tutorial

=====================================================================

Unit-1 :   Introduction    to  JAVA7.0(OAKJAVA7)  Programming  Language

=======================================================================

Definition:

============

“JAVA7.0(OAKJAVA7)   is  meant   for   Code Security, Learnable,Console software, it is Advanced , used  in Software  development, Remote X Application, web application  ,machine Learning,etc, and  it  symbolizes  Star  symbol,   used  with  OAKJAVA7  framework  like scroll framework ”

ABOUT JAVA7.0(OAKJAVA7)

=======================

JAVA7.0 Programming  Language   is otherwise  known  as  OAKJAVA7

(JAVA7)  which is  invented by  wilmix jemin  j  at  year  2013 

in  java ,DOTWEB3.0.

This   two  versions  of  JAVA  (Jdk1.8,jdk1.7)  failed  that  is  using  JAD  decompiler  we  can   easily  take   the  source   code.. 

We  felt   thanks  to  best  friends  venkat  friend ,  github ,  and  all  for  their   support..

DEMERITS  of JAVA and  C#

=======================

a) JAVA  class  file   has  many demerits  so  any thing  you create  a compiler  in  java

the source  code  can  be  easily  taken  by JAD.

b)  C#  (.exe  or  .dll)  source code can  also  be  taken  using  any code  reflector available  in  google site.

That's  why   JAVA7.0  is  focused.

So Creating software  in C#  is  useless.

JAVA7.0 is a  OAKJAVA7 and it  is  used  for creating  datastructures  and    compilers.

JAVA7.0  accepts  ".java7"or ".oakjava7"   filename  and  translate  to  OakJava7 class file.

that  java  is  said  to  oak  java  different  from  orginal java; which  is   not understood  by hackers. JAVA7.0  loads    .dll in   memory  to create  a  Console based  software .,used in constructing  OakJava7 (Java7.0)  webapplication and Remote X application.

OakJava7 (Java7.0)   is  not  focused    for  GUI side  eg)   Java Swing.

Is  it possible  to  create  a   compiler  like   Java compiler?

By   using  Java  compiler  we  can   create  a   Java compiler  or   What  ever compiler  you want. But  when  you create  a    Java like compiler  from  Java  some  competitors or  unauthorized  hackers who  visit the  webpage  say  it is  wrong. But according    to principles  of   Compiler   design  it  is  right. Because  you are designing the compiler  and   writing  java source code  to  design  a  java like  compiler. The   same thing  we  can  create  for  C programming language ,etc.  Iam  not   focused  on  Creating  like  Java Swing  or  Like  Java/j2ee. Because this  hacker  or  unwanted  person  or competitors  will  say  lies about me. So it  will  affect  my products.

My Compiler design history

At age 21 ,i design a compiler in    C/C++.And Later i designed a  mini compiler in java.



Why Oakjava7 is  Advanced   than   any  programming language ?


i) Both Oakjava7 and java/j2ee  is like  english fluent language.

ii) Using Oakjava7  we can reduce the  lines of code.

iii) Oakjava7 and Java/j2ee follow camel case and can be adjusted  at any style with beautiful arrangement  using Intellij IDE .

iv) Oakjava7 author is not interested in Robot design (AI) field. Because AI is

belong to antichrist technology. 

v) OakJava7 module Oakjava8 is  best  in Mobile computing.

=======================================================

OakJava7  Programming Modules  is  divide into  2 modules Which are  OakJava7  - Module -1 And  OakJava7 Module -2.

 

About  OakJava7  Modules

OakJava7  keywords are created simillar to its parent java , so that it is easy for the java professionals and companies to follow or learn it. Only there is  some  major syntax have attractive syntax. But Oakjava7 is used in console application,Web application, Machine learning application, Datascience, and Remote X application. Here in this  OakJava7 modules  Module-1 is  followed by Java or Oakjava7 Professionals. But Oakjava7 Module-2 is followed  by Oakjava7  or  C/C++ or .NET professionals. We will release Remote -X Application later after machine Learning and  data science are completely released.

 

OakJava7 Reserved Keywords -MODULE1

OakJava7  has a set of keywords that are reserved words that cannot be used as variables, methods, classes, or any other identifiers.

Keyword  and Description



<JAVA7>


This <JAVA7> is the keyword indicates the starting point of the

OakJava7 program. And it is the attractive syntax. When we use

this Keyword it will handle input and output operations.


</JAVA7>


This </JAVA7> is the keyword indicates the ending point of the

OakJava7 program. And it is the attractive syntax. When we use

this Keyword it will tell the compiler to end that program.


abstract

A non-access modifier. Used for classes and methods: An abstract class cannot be used to create objects (to access it, it must be inherited from another class). An abstract method can only be used in an abstract class, and it does not have a body. The body is provided by the subclass (inherited from)


assert


For debugging and checking conditions


boolean


A data type that can only store true or false values


break


Breaks out of a loop or a switch block


byte


A data type that can store whole numbers from -128 and 127


case


Marks a block of code in switch statements


<CATCH>


Catch all the exceptions generated by try statements


char


A data type that is used to store a single character


<CLASS>


Defines a class


continue


Continues to the next iteration of a loop

  

default


Specifies the default block of code in a switch statement


do


Used together with while to create a do-while loop


double


A data type that can store fractional numbers from 1.7e−308 to 1.7e+308


else


Used in conditional statements


enum


Declares an enumerated (unchangeable) type


<---

Extends a class (indicates that a class is inherited from another class)


final


A non-access modifier used for classes, attributes and methods, which makes them non-changeable (impossible to inherit or override)


<FINALLY>

Used with exceptions, a block of code that will be executed no matter if there is an exception or not


float


A data type that can store fractional numbers from 3.4e−038 to 3.4e+038


for


Create a for loop  for single looping and double or .. looping purpose


if


Makes a conditional statement


-->


Implements an interface


<IMPORT>


Used to import a package, class or interface


instanceof


Checks whether an object is an instance of a specific class or an interface


int


A data type that can store whole numbers from -2147483648 to 2147483647


interface


Used to declare a special type of class that only contains abstract methods


long


A data type that can store whole numbers from -9223372036854775808 to 9223372036854775808


native


Specifies that a method is not implemented in the same Java source file (but in another language)


new


Creates new objects


<PACKAGE>

Declares a package


private


An access modifier used for attributes, methods and constructors, making them only accessible within the declared class


protected


An access modifier used for attributes, methods and constructors, making them accessible in the same package and subclasses


public


An access modifier used for classes, attributes, methods and constructors, making them accessible by any other class


return


Finished the execution of a method, and can be used to return a value from a method


short


A data type that can store whole numbers from -32768 to 32767


<SHARED>


A non-access modifier used for methods and attributes. Static methods/attributes can be accessed without creating an object of a class


<SUPER>


Refers to superclass (parent) objects


switch


Selects one of many code blocks to be executed


synchronized


A non-access modifier, which specifies that methods can only be accessed by one thread at a time


<IS>


Refers to the current object in a method or constructor


throw


Creates a custom error


throws


Indicates what exceptions may be thrown by a method


transient


Used to ignore an attribute when serializing an object. transient state

is not saved.


<TRY>


Creates a try...catch statement. All try key words should include 

catch block...


void


Specifies that a method should not have a return value


volatile


Indicates that an attribute is not cached thread-locally, and is always read from the "main memory". Here multiple thread can access it

there will be no traffic.


while


Creates a while loop. If the condition is  true while loop will process

the  statements inside the block other wise it will  exit out of the loop.



==============================================================


Note: Now look at this given below sample program how this keyword for Oakjava7  is  used....


testme.java7


<JAVA7>


public <CLASS> testme 

//--> Runnable

<--- <Thread>


<%





public <SHARED> int sum()


{


int b;



return(2+3);

}

     public synchronized void <RUN>


{


<TRY>

{

<PRINTLINE>(" Under Weight is less than  15 your health is  worst ="+sum());


<Thread>.sleep(1000); 

throw new Exception();

}


<CATCH> (Exception e)

{

<PRINTLINE>(""+e);



}



}



          <MAIN>


          <%

<TRY>


{



testme t <NEW> testme();


t.start();



testme t1 <NEW> testme();


t1.start();

                 int value = 15;

if (value >=15)

{

        assert value >= 25 : " Underweight";

      <PRINTLINE>(" value is " + value);


}

else

{

 <PRINTLINE>(" Under Weight is less than  15");

}



}


<CATCH> (Exception e)

{


<PRINTLINE>(""+e);


}


<FINALLY> 


{


<PRINTLINE>("   note: please enter accurately");



}


         %>




</JAVA7>







Output


  value is 15 Under Weight is less than  15 your health is    worst =5


 Under Weight is less than  15 your health is  worst =5  

 note: please enter accuratelyjava.lang.Exceptionjava.lang.Exception


 ========================================================

Note: The  hackers (unauthorized person) may  copy  JAVA7.0 features  and  implement it. That's why  we kept  OakJava7  features as  secret.

  

=========================================================================

Unit-2:   Program  Structures   for   OAKJAVA7

=========================================================================

SYNTAX-1:

=======

filename.web

===========

<WEB>

<USE> packages;

<PACK> packagename

{

    <CLASS>  <classname>

   {

      public void main()

      {

        <! source  code !>

      }

   }

}

SYNTAX-2:

=========

Filename.java7

================

public  class  <classname>


{


//This constructor with super method is mandatory, which indicates it is a oakjava7 //program

// This  constructor  should have same name  as  the  classname .

public  <classname>() 


super();


}


// it means it will not support any java compiler, it is entirely different.


public void main()


{


<! OAKJAVA7 Logic !>


}


}


Example:

Query3.java7


 class Query3

{

public Query3()

{

super();

         }

// Method declared for this  Oakjava7 program to print

//the text Welcome! to EveryBody


      public void displayhtmltoweb(String a)

{

//print is  to print the text or html GUIS

print("\n\n");

print("<HTML><script> </script><body bgcolor=green> Welcome!</body></html>"++a);


print("\n\n");



}


// All the oakjava7 main method  should have public void main() instead of

 //public static void main method  of java language.

        public void main()

{

// call the displayhtmltoweb


displayhtmltoweb(" to EveryBody");

}

}

Note: This  is  simillar  to  Java Servlet , This  topic  is  mentioned only   at  Enterprise  edition. And  this program generated  class file  is  sealed  as

"An Oakjava7(JAVA7.0) compiler - jemin Information  technology - JIT-777-WRIT-0003 Query3.class" .  So this  is another type of oakjava7 program  and  it is called as  Oakjava7 Servlet.



SYNTAX-3

========

filename.java7

============

<JAVA>

<USE> packages;

<PACK> packagename

{

    <CLASS>  <classname>

   {

      public void main()

      {

        <! source  code !>

      }

   }

}

SYNTAX-4

========

Filename.java7 

==============

<JAVA7>

<Access modifiers>  <CLASS> <classname>

{

 <MAIN> //  it  means it cannot  be  run   in   jdk1.8 compiler

<%

<!  OAKJAVA7 Logic  !>

%>

</JAVA7>

JAVA7.0  SYNTAX-1  Program  Structure(.web)

=============================================

Beginning  Section  :  <WEB>

Documentation  Section 

Package  Statement;

<USE> Statement;

<PACK> packagename

LOGIC  SECTION

    <CLASS>  <classname>

   {

      public void main()

      {

        <! source  code !>

      }

CLOSE  LOGIC  SECTION

ENDING  SECTION : }

Explanation:

JAVA7.0  Ending  section  is   }  ;  Ending  your  JAVA7.0  program

Documentation  Section   means   you  can  include  description   

with  comments.

Package  statement  means   you   had  to  include  JAVA7.0 program  in  Package  ....

<USE>  statement  to  import  all  the  packages.

Interface   statement   for    supporting   multiple  inheritance.

Logic   section    for   writing   JAVA7.0  logic  with   Class   followed  by main   method .

after  writing logic   close    the  logic   section.  

JAVA7.0  SYNTAX-2  Program  Structure(.java7)

Declaration Oakjava7  Section  : 

 public class  <classname>

{

//This constructor with super method is mandatory, which indicates it is a oakjava7 //program and  class name and   constructor name should be  same

public  <classname>() 

super();

}

Documentation  Section 

// it means it will not support any java compiler, it is entirely different.

Package  Statement;

Import  Statement;

OAKJAVA7 LOGIC  SECTION

// Oakjava7  main method should have public void main  method  otherwise oakjava7

program  will not  compile....

   public void main()

{

<! OAKJAVA7 Logic !>

}

CLOSE OAKJAVA7  LOGIC  SECTION   }

LOGIC  OAKJAVA7  DATASTRUCTURE SECTION

class  <CLASSNAME>

{


private <CLASSNAME>()

{

super();

}

................

................

................


CLOSE LOGIC OAKJAVA7 DATASTRUCTURE SECTION }


ENDING  SECTION : 

Explanation:

All  JAVA7.0   should    start    oakjava7  declaration section as


public class  <classname>

{

//This constructor with super method is mandatory, which indicates it is a oakjava7 //program. The class name and  constructor  of  Oakjava7 program should be  same.

public  <classname>() 

super();

}   

after that OAKJAVA7 LOGIC  SECTION should be

   public void main()

{

<! OAKJAVA7 Logic !>

}

so <!OAKJAVA7 Logic>  may have print statements, for loop,

Datastructure statements belong to  another class.

But Logic  Oakjava7  DataStructure Section should be in this format

class  <CLASSNAME>

{


private <CLASSNAME>()

{

super();

}

and Close Logic Oakjava7 DataStructure section by using   curly braces which is "}".

I hope  this  syntax  change  will be  easy  to  follow  and  to  do programming  

in Oakjava7. I remove the  complexity of  the  oakjava7  program syntax. So now

this  type  of  oakjava7 servlet  syntax  is  learnable.



=================================

JAVA7.0  SYNTAX-3 Program Structure

=================================

filename.java7

=============

Beginning  Section  :  <JAVA>

Documentation  Section 

Package  Statement;

<USE> Statement;

<PACK> packagename

LOGIC  SECTION

    <CLASS>  <classname>

   {

      public void main()

      {

        <! source  code !>

      }

CLOSE  LOGIC  SECTION

ENDING  SECTION : }

Explanation:

JAVA7.0  Ending  section  is   }  ;  Ending  your  JAVA7.0  program

Documentation  Section   means   you  can  include  description   

with  comments.

Package  statement  means   you   had  to  include  JAVA7.0 program  in  Package  ....

<USE>  statement  to  import  all  the  packages.

Interface   statement   for    supporting   multiple  inheritance.

Logic   section    for   writing   JAVA7.0  logic  with   Class   followed  by main   method .

after  writing logic   close    the  logic   section.  

JAVA7.0  SYNTAX-4  Program  Structure(.java7)

Beginning  Section  :  <JAVA7>

Documentation  Section 

Package  Statement;

Import  Statement;

LOGIC  SECTION

<Access modifiers>  <CLASS> <classname>

   {

     <MAIN>

      {

        <! source  code !>

      }

CLOSE  LOGIC  SECTION

ENDING  SECTION : </JAVA7>

Explanation

All  JAVA7.0   should   start   with   <JAVA7> then after  that  followed  by<CLASS>  <classname>   

But   <MAIN>  is   used   instead   for  

 public  static void  main(String args[]) for  protection  from hackers.

Logic   section    for   writing   JAVA7.0  logic  with   Class   followed  by main   method .

after  writing logic   close    the  logic   section.  

A) Print numbers between  0  to 99  using oakjava7 -major syntax:-

display2.java7

=============

<JAVA7>

public <CLASS>  display2

{

<MAIN>

<%

for (int i=0;i<100;i++)

{

<PRINTLINE>(""+i);

}

%>

</JAVA7>

Output:

=======

 0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

b) How  to  draw Bernoulli Distribution  using  Oakjava7-major syntax ie  filename.java7 ?

Bernoulli.java7

================

<JAVA>

<USE> Java7MLGraphics;

<PACK> Bernoulli1

{

<CLASS> binomialdist

    {

           public void main()

        {

            

           Bernoulli.Draw(32, 1000, 0, 0.2);

            Console.ReadKey();

 

        }

    }

}

Note:  This  can  be  done in  just  one line

ie)  Bernoulli.Draw(32, 1000, 0, 0.2)

Syntax  For  Bernoulli  Distribution  is

Bernoulli.Draw(int n, int trials,int coord1,double coord2)

Note: You  can  to include   Java7MLGraphics.dll,IKVM.OpenJDK.SwingAWT.dll

in  Java7.0 properties  file..

JAVA7-ML -Bernoulli distribution

c) Write  a  oakjava7-major program using Java7 Colections  with a  Box example:-

Programs1.java7

===============

<JAVA>

<USE> <OAKJAVA7>.IO; //oakjava7-<OAKJAVA7>-io packages

<USE> CUTIL; //oakjava7 cutil packages

<PACK> BoxApplication

{

   <CLASS> Box

   {

      private double length;   // Length of a box

      private double breadth;  // Breadth of a box

      private double height;   // Height of a box

      public void setLength( double len )

      <%

         length = len;

      }

      

      public void setBreadth( double bre )

     <%

         breadth = bre;

      }

      

      public void setHeight( double hei )

    <%

         height = hei;

      }

      public double getVolume()

     <%

         return length * breadth * height;

      }

   }

    <CLASS> Boxtester

   {

      public void main()

      {

         Box Box1 <NEW> Box();   // Declare Box1 of type Box

         Box Box2 <NEW> Box();

         double volume;

         

         // Declare Box2 of type Box

         // box 1 specification

         Box1.setLength(6.0);

         Box1.setBreadth(7.0);

         Box1.setHeight(5.0);

         

         // box 2 specification

         Box2.setLength(12.0);

         Box2.setBreadth(13.0);

         Box2.setHeight(10.0);

         

         // volume of box 1

         volume = Box1.getVolume();

     <PRINTLN>("Volume of Box1 :" +volume);

         

         // volume of box 2

         volume = Box2.getVolume();

         // <PRINTLN>("Volume of Box2 : {0}", volume);

         

        // Console.ReadKey();

         CUTIL.ArrayList x <NEW> CUTIL.ArrayList();

      

      // test size

         <PRINTLN>("Initial size is " + x.size());

      

      // test isEmpty

         if (x.isEmpty())

            <PRINTLN>("The list is empty");

         else <PRINTLN>("The list is not empty");

      

      // test put into  ArrayList

  x.add(0, Java7Collection.QUERY()); // get previous data  from java7collection and put it into java7-arraylist at 0 location.

         x.add(1, (6));

         x.add(0, (1));

         x.add(2, (4));

         <PRINTLN>("List size is " + x.size());

      

      // test toString

         <PRINTLN>("The list is " + x);

String JAVA5 = "Java 5";

        String JAVA6 = "Java 6";

        String JAVA7 = "Java 7";

int  c=1;

       switch (c) {

           case 1:

               <PRINTLN>(JAVA5);

               break;

           case 2:

               <PRINTLN>(JAVA6);

               break;

           case 3:

               <PRINTLN>(JAVA7);

               break;

       }

<TRY>

{

Java7Collection.InsertQUERY(x.ToString());// insert  arraylist  at  java7 collection memory

Java7Collection.QUERY(x.ToString(),"display23");// merge  the  output  display23.java7.exe output  with  arraylist

}

<CATCH> (<EXE> e) {}

      

      // test indexOf

         int index = x.indexOf((4));

         if (index < 0)

            <PRINTLN>("4 not found");

         else <PRINTLN>("The index of 4 is " + index);

      

         index = x.indexOf((3));

         if (index < 0)

            <PRINTLN>("3 not found");

         else <PRINTLN>("The index of 3 is " + index);

      

      // test get

         <PRINTLN>("Element at 0 is " + x.get(0));

         <PRINTLN>("Element at 3 is " + x.get(3));

      

      // test remove

         <PRINTLN>(x.remove(1) + " removed"); //arraylist data removed

         <PRINTLN>("The list is " + x);

         <PRINTLN>(x.remove(2) + " removed");// 6  is removed

         <PRINTLN>("The list is " + x);

      

         if (x.isEmpty())

            <PRINTLN>("The list is empty");

         else <PRINTLN>("The list is not empty");

      

         <PRINTLN>("List size is " + x.size());

  

      }

   }

}

The  given  output  indicates  that  it  is  merging  two java7 output  by using  Java7collection.

Output:

=======

Volume of Box1 :210

Initial size is 0

The list is empty

List size is 4

The list is [1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [2000], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]

Java 5

HELLO WORLD!  MY First Java7.0 Program-display-program-1

The index of 4 is 2

3 not found

Element at 0 is 1

Element at 3 is 6

[[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [[1, [2000], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]], 4, 6]] removed

The list is [1, 4, 6]

6 removed

The list is [1, 4]

The list is not empty

List size is 2

=================================================================================================

UNIT-3  : OAKJAVA7  Advanced   Concepts (OakJava7 util packages)

=================================================================================================

OakJava7 Advanced  Concepts

========================

This  is about  Oakjava7 Advanced Concepts invented by Wilmix Jemin j belong  to  Oakjava7 Programming Language which  will  be  used   with OAKJAVA7  Programming Language. Its file extension  is  .oakjava7.


BUCKET

-------


Bucket are used to store key,value data, and Generated Random number

where datatype may be string ,object ,etc.


SYNTAX:

------


Bucket<DATATYPE> list = <NEW> Bucket<DATATYPE>(<DATATYPEVALUE>);

list.KeyAdd(<DATATYPEVALUE>);

list.add(<DATATYPEVALUE>);

list.RandomAdd();

list.Display(list);


Advantages

----------


Using Bucket you can also Retrieve the values stored n position.

Searching and Insertion is fast than other DTS.

Random Indexing is possible.

eg) If you store a duplicate value such Random key will be different.

It also used to add many values.


EXTEND


------


Extend class is used in ,<OAKJAVA7> since to provide multiple inheritence


about 100000000 classes . Extends class also list values in methods and


constructor values.


Extend means a Bucket contains List of class and it is also


Behave like Bucket. So it is also one of the Advanced concepts in JDollarShell.


SYNTAX:


--------


EXTEND <<DATATYPE>> list11 = <NEW> EXTEND <<DATATYPE>> (STRING);


list.KeyAdd(<DATATYPEVALUE>);


list.add(<DATATYPEVALUE>);


list.RandomAdd();


list.Display(list);


Advantages:


It is also used to add many values


Indexing is possible


Value can also be list by index and behave like bucket.


It list only the class value and object value.


It is stateless.


PIPE:


-----


PIPE is used to maintain stateful state.


It is used for DataFlow in a Program. We can also add the values,


Constructor values of one class and other class and display it.


It also list the values from the Bucket.


SYNTAX:


-------


Pipe <<DATATYPE>> list11 = <NEW> Pipe <<DATATYPE>> (STRING);


list.KeyAdd(<DATATYPEVALUE>);


list.add(<DATATYPEVALUE>);


list.RandomAdd();


list.Display(list);


BUCKET


-------


Bucket are used to store key,value data, and Generated Random number


where datatype may be string ,object ,etc.


SYNTAX:


----------


Bucket<DATATYPE> list = <NEW> Bucket<DATATYPE>(<DATATYPEVALUE>);


list.KeyAdd(<DATATYPEVALUE>);


list.add(<DATATYPEVALUE>);


list.RandomAdd();


list.Display(list);


Advantages


----------


Using Bucket you can also Retrieve the values stored n position.


Searching and Insertion is fast than other DTS.


Random Indexing is possible.


eg) If you store a duplicate value such Random key will be different.


It also used to add many values.


EXTEND


------


Extend class is used in ,<OAKJAVA7> since to provide multiple inheritence


about 100000000 classes . Extends class also list values in methods and


constructor values.


Extend means a Bucket contains List of class and it is also


Behave like Bucket. So it is also one of the Advanced concepts in OakJava7(JAVA7.0).


SYNTAX:

--------


EXTEND <<DATATYPE>> list11 = <NEW> EXTEND <<DATATYPE>> (STRING);


list.KeyAdd(<DATATYPEVALUE>);


list.add(<DATATYPEVALUE>);


list.RandomAdd();


list.Display(list);


Advantages:

===========


It is also used to add many values


Indexing is possible


Value can also be list by index and behave like bucket.


It list only the class value and object value.


It is stateless.


PIPE:


-----


PIPE is used to maintain stateful state.


It is used for DataFlow in a Program. We can also add the values,


Constructor values of one class and other class and display it.


It also list the values from the Bucket.


SYNTAX:


-------


Pipe <<DATATYPE>> list11 = <NEW> Pipe <<DATATYPE>> (STRING);


list.KeyAdd(<DATATYPEVALUE>);


list.add(<DATATYPEVALUE>);


list.RandomAdd();


list.Display(list);


OakJava7 MAIN  Program Syntax  AND ADVANCED   CONCEPTS  PROGRAM.

(<filename>.oakjava7)


Syntax:


<OAKJAVA7>


<PACK> <NAMESPACE>


<%


    <CLASS> <CLASSNAME>


    {


        public void main()


        {


            


<!  OakJava7  LOGIC!>              


               


     


%>


?>


BAG

=====


Bag is the extension of LinkedHashmap and it is the fastest

datastructures than Dictionary.


SYNTAX:

=======


Bag object = new Bag();


object .put(key,value);


Functions


getValues(key) => it is used to get the values for a particular key


get(key,loc) => it is used to get the value stored at a loc (indexing


purpose)


boolean containsValue(object Value) => To check the value present in bag or


not.


put(key,value) => it is used to add key and value in Bag


remove(key ,value) => It is used to remove key and value.


TreeList

========


TreeList simillar to Bucket but store items in tree format.


TreeList list = new TreeList ("BUCKETS");


list.KeyAdd(KEY);


list.add(VALUE1);


list.RandomAdd(RANDOMNO);


list.DisplayO(list,0);


MASK


====


It is the extension of Tree Structure and it can store many values


using mask object and we can also retrieve the values stored in mask.


Mask m = new Mask(<DATATYPE>);


m.add(multiple values);


m.getR(Loc); => Get the values stored in right position


m.getL(LOC) => Get the values stored in left position


HEAP:


====


Creates a tree , puts the data into tree in a fairly balanced way and displays


the tree's size and data in a tree by performing an inorder traversal.


Heap hob = new Heap(<datatype>);


hob.add(datum);


hob = new Heap(key,value1,value2);


Bucktist


==========


Bucktist is simillar to Bucket but it is used to addd two values with one


key.


Bucktist l = null;


l= new Bucktist(key,value1,value2);


WICKET


=======


Wicket is used to store multiple values using same object with


4 values per key.


Syntax:


Wicket list12;


list12=new Wicket(key,v1,v2,v3,v4);


list12.Display();


list12.Display(list12,location);



EXAMPLE -1: BAG

===============


<OAKJAVA7>


<PACK> MyP


<%


    <CLASS> Programs


    {


        public void main()


        {


            


        Bag  b <NEW> Bag();


b.PUT(1,34);


b.PUT(2,444);


<PRINTLN>(""+b);


              


               


     


%>


?>


EXAMPLE:2  : OAKJAVA7-CDOLLARARRAYS


==========


<OAKJAVA7>


<USE> CUTIL;


<PACK> MyP


{


    <CLASS> Programs


    {


         


        public void main()


        {


            


ArrayList ar <NEW> ArrayList ();


for (int i=0;i<=100;i++)


ar.add(i,i);




<CDOLLARARRAYS> list1 <NEW>  <CDOLLARARRAYS>("ANIMALS ");


        list1.add("1 horse");


list1.add("2 pig");


list1.add("3 cow");


list1.add("4 goat");


list1.add("5 chicken");



list1.add("6 ostrich");


list1.add(ar.StringConvert()); 



for (int i=0;i<list1.size();i++)


<PRINTLN>(""+list1.get(i));



              


               


     %>


?>

Note: <CDOLLARARRAYS> is a Keyword belong to OakJava7(JAVA7.0).


EXAMPLE-3: CREATE  AN  BOOTLOADER   Using OAKJAVA7



<OAKJAVA7>

<USE> CUTIL;


<PACK>  MYOS


{


    <CLASS> MYOs


    {


public void main(){


<PRINTLN>("HelloWorld  for  booting  MYOS");


          


               


     %>


?>


EXAMPE-4: POINTERS


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyP


{


    <CLASS> Programs


    {


        public void main()


        {


            


 <Str>  s="dsdds";


 


 {*} l Pointers (s);  


 


l.add(s);


 


 for (int i = 0; i NOT= l.size(); i = i + 1)


 {


 


 <OBJECT> obj=l.GETKEY(i);


 <PRINTLN>(obj);


 


 


 


 }


 

     %>


?>



EXAMPLE-5: DICTIONARY

=====================


<OAKJAVA7>


<USE> System.Collections.Generic;


<PACK> MyP


{


    <CLASS> Programs


    {


         


        public void main()


        {


            


 Dictionary<string, string> openWith  <NEW>  Dictionary<string, string>();


openWith.Add("txt", "notepad.exe");


openWith.Add("bmp", "paint.exe");


openWith.Add("dib", "paint.exe");


openWith.Add("rtf", "wordpad.exe"); 


              


             


               


     %>


?>


Example-6: EXTEND

=================


<OAKJAVA7>

<USE> CUTIL;


<IMPORT>


<PACK> MyP


<%


    <CLASS> Programs


    <%


        public void main()


        {


 


 


 EXTEND list <NEW> EXTEND("BUCKETS");


 


 


 


 


      list.KeyAdd("1101");  


                    


                     list.add("jemin");


                     


                     list.RandomAdd();    


                     


                     list.Display(list);


                    


<PRINTLN>(""+list.DisplayO(list,1));


 


%>


?>


EXAMPLE-7: HEAP


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyP


{


      <CLASS> Programs


    {


         public void main()


        {


 


 Heap root <NEW> Heap("wilmix");


 


 for (int i = 0; i <= 10; i = i + 1)


 {


 root.add("item " + i);


 }


                 


 <PRINTLN>(root.size() );


 root.printTree();


          


               


     %>


?>


Example-8: LArray


<OAKJAVA7>


<USE> CUTIL;


<PACK> MyP


{


    <CLASS> Programs


    {


          public void main()


        {



LArray root <NEW> LArray("root");



ArrayList ar <NEW>  ArrayList();




for  (int  i=0;i<=1000;i++)



ar.add(i,i);



root.add("wilmix");


root.add("jemin");


root.add("shalom");


root.add("1010");


root.add("101");


root.add("201");


root.add(ar.StringConvert());


root.add("100000000");


//print the tree's size and contents



root.printTree();


          


               


     %>


?>


Example-9 : PIPE


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyP


{


    <CLASS> Programs


    {


public void main()


        {


 


Pipe list  <NEW> Pipe("BUCKETS");


 


 


 


 


      list.KeyAdd("1101");  


                    


                     list.add("jemin");


                     


                     list.RandomAdd();    


                     


                     list.Display(list);


<PRINTLN>(""+list.DisplayO(list,1));


 


          


               


     %>


?>


EXAMPLE-10: TREELIST

=====================


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyP


{


    <CLASS> Programs


    {


        public void main()


        {


 


TreeList list  <NEW> TreeList ("BUCKETS");


 


 


 


 


 


 


      list.KeyAdd("1101");  


                    


                     list.add("jemin");


                    


                     


                     list.RandomAdd("1111");   


TreeList list2 <NEW> TreeList("BUCKETS");


 list2.KeyAdd("1102");  


                    


                     list2.add("rahul");


                    


                     


                     list2.RandomAdd("1112");


                     


                 


<PRINTLN>("DATA="+list.DisplayO(list,0));


<PRINTLN>("DATA="+list2.DisplayO(list2,0));


          


               


     %>


?>


Example-11 : MASK


<OAKJAVA7>


<USE> CUTIL;


<PACK> My


{


    <CLASS> Programs


    {


           public void main()


        {



MASK root <NEW> MASK("wilmix");



for (int i = 0; i NOT= 10; i = i + 1)


{


root.add("item " + i);


}


             






root <NEW> MASK("root1",1211211,54441);



root  <NEW> MASK("root2",121121,5444);


root  <NEW> MASK("root5",99121888,"5");



root  <NEW> MASK("root3",12112,544);



root  <NEW> MASK("root4",1211,54);



root  <NEW> MASK("root51",121,5);




root.printTree();



          


               


     %>


?>


Example-12 : WICKET

====================


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyPo


{


    <CLASS> Programs


    {


           public void main()


        {


 Wicket  list12;


 list12 <NEW> Wicket(1000,10002,43433,4343,5555451);


 list12 <NEW> Wicket(10001,100021,434331,4343,5555452);


 list12 <NEW> Wicket(10002,100022,434332,4343,5555453);


 list12 <NEW> Wicket(10003,100023,434333,4343,5555454);


 list12 <NEW> Wicket(10004,100024,434334,4343,5555455);


 list12 <NEW> Wicket(10005,100025,434335,4343,5555456);


 


 


 list12.Display(list12);


 


 <PRINTLN>("DATA="+list12.DisplayO(list12,0));


                 


          


               


     %>


?>


Example-13 : STRUCTURE


<OAKJAVA7>

<USE> CUTIL;


<PACK> MyPoi


{


    <CLASS> Programs


    {


          public void main()


        {


            


 <Str>  s="dsdds";


 


 {*} l Pointers(s);  


 


l.add(s);


 


 for (int i = 0; i NOT= l.size(); i = i + 1)


 {


 


 <OBJECT> obj=l.GETKEY(i);


 <PRINTLN>(obj);


 


 


 


 }


 


 


 


 


 <STRUCTURE>  list <NEW> <STRUCTURE> (l.GETKEY(0));


 


 for (int i11 = 0; i11 NOT= list.size(); i11 = i11 + 1)


 {


 


 


 


 <OBJECT>  el=list.ret(i11);


 


 


 <PRINTLN>("SNO= "+el);


                }


              


            


               


     %>


?>


Example-14 : BUCKETIST

======================


<OAKJAVA7>

<USE> CUTIL;

<PACK> MyP


{


    <CLASS> Programs


    {


          public void main()


        {


 


Bucketist  bp    <NEW>  Bucketist("wilmix");


bp    <NEW>  Bucketist(1,222,434);


bp   <NEW>  Bucketist(1,222,434);


bp.Display(bp);


<PRINTLN>("DATA="+bp.DisplayO(bp,1));


          


               


     %>


?>



====================================================================================

UNIT 4 : OAKJAVA7  Advanced OOPS 

======================================================================================


OAKJAVA7   Advanced OOPS

========================

JAVA7.0  Advanced  Oops  add  features  like

Operator  overloading  , friend  function,Gdollar oops,Jstar oops,

Chdollar oops ,  JDk-java  oops, and ,Java7.0 oops.

We  already  know  about  the   concepts   like  JDollar shell packages, oops,Gdollar oops,Jstar oops,Chdollar oops. But  java  developers did not  know  about   Java7.0  Advanced  concepts.

JAVAFILEAPIS

=============

JFile. display(String  f1) =>  Display  the  file  attributes

JFileInputStream.ReadBytes(String f1,int p) => This  is  used  to  readbytes form the file

JFileOutputStream.Write(String data,String  f1 ,String  f2, String  f3,int r1,int r2) => This  is  used  to  write a   databytes  to  a file

JFileReader.Read(String f1,int d) =>  This  is  used  to  read from file

JFileWriter.Write( String f1, char  data[], String  f2, String  f3,String  app,int r1,int r2) => This  is  used  to  write a   data to  a file

JInputStreamReader.ReadLN() => it  is  used  to read a  character  for  a file

JPrinter.call() => Printer  enabled   

JPrintWriter.display(String s1) =>  Write  a  String 

JSerialization.Serialize(String a,String s1,String  s2) => Serialize  and  deserilaize  a  string

JStreamTokenizer.Split(String f1) => Split  the  String  to  tokens.

  

Program1.web

<WEB>

<USE> <OAKJAVA7>.IO;  // OakJava7 IO Package

<USE> CUTIL;

<PACK> BoxApplication

{

   <CLASS> Box

   {

      private double length;   // Length of a box

      private double breadth;  // Breadth of a box

      private double height;   // Height of a box

      public void setLength( double len )

      <%

         length = len;

      }

      

      public void setBreadth( double bre )

     <%

         breadth = bre;

      }

      

      public void setHeight( double hei )

    <%

         height = hei;

      }

      public double getVolume()

     <%

         return length * breadth * height;

      }

   }

    <CLASS> Boxtester

   {

      public void main()

      {

         Box Box1 <NEW> Box();   // Declare Box1 of type Box

         Box Box2 <NEW> Box();

         double volume;

         

         // Declare Box2 of type Box

         // box 1 specification

         Box1.setLength(6.0);

         Box1.setBreadth(7.0);

         Box1.setHeight(5.0);

         

         // box 2 specification

         Box2.setLength(12.0);

         Box2.setBreadth(13.0);

         Box2.setHeight(10.0);

         

         // volume of box 1

         volume = Box1.getVolume();

     <PRINTLN>("Volume of Box1 :" +volume);

         

         // volume of box 2

         volume = Box2.getVolume();

         // <PRINTLN>("Volume of Box2 : {0}", volume);

         

        // Console.ReadKey();

         CUTIL.ArrayList x <NEW> CUTIL.ArrayList();

      

      // test size

         <PRINTLN>("Initial size is " + x.size());

      

      // test isEmpty

         if (x.isEmpty())

            <PRINTLN>("The list is empty");

         else <PRINTLN>("The list is not empty");

      

      // put   datafrom file Java7Model.model

         x.add(0, Java7Collection.QUERY());

         x.add(1, (6));

         x.add(0, (1));

         x.add(2, (4));

         <PRINTLN>("List size is " + x.size());

      

      // test toString

         <PRINTLN>("The list is " + x);

//insert  value  into  Java7Model.model

Java7Collection.InsertQUERY(x.ToString());

      

      // test indexOf

         int index = x.indexOf((4));

         if (index < 0)

            <PRINTLN>("4 not found");

         else <PRINTLN>("The index of 4 is " + index);

      

         index = x.indexOf((3));

         if (index < 0)

            <PRINTLN>("3 not found");

         else <PRINTLN>("The index of 3 is " + index);

      

      // test get

         <PRINTLN>("Element at 0 is " + x.get(0));

         <PRINTLN>("Element at 3 is " + x.get(3));

      

      // test remove

         <PRINTLN>(x.remove(1) + " removed");

         <PRINTLN>("The list is " + x);

         <PRINTLN>(x.remove(2) + " removed");

         <PRINTLN>("The list is " + x);

      

         if (x.isEmpty())

            <PRINTLN>("The list is empty");

         else <PRINTLN>("The list is not empty");

      

         <PRINTLN>("List size is " + x.size());

  

      }

   }

}

=======================================================

Program -2:oakjava1.java7

<JAVA7>



<CLASS> oakjava1


<%


 void  display() 


<%


<PRINTLINE>("wilmix is going");



%>

%>


<CLASS> oakjava2


<%


 <MAIN> 


//  it  means it cannot  be  run   in   jdk1.8 compiler


<%


oakjava1 o  <NEW>  oakjava1();


<PRINTLINE>("Wilmix is going");


%>


</JAVA7>


Compile  the  program  using

javac7 oakjava1.java7

Run  the  program  using

java7  oakjava2

Output:

Wilmix  is  going

================================================================================

                        OAKJAVA7(JAVA7.0)   ADVANCED  CONCEPTS

==============================================================================================

UNIT-7:  OAKJAVA7   with  JDollar(JWEB) and CHDollar(CH$),ONLINE BILLING,FORMS,REPORTS

==============================================================================================

Note: This  Topic  like JDollar(JWEB) and CHDOLLAR(CH$),Online Billling ,Forms ,reports

are  not  Included   in  OakJava7 version ; because  JDollar(JWEB), And  CHDOLLAR(CH$) is not

released. and  JDollarshell contain  bugs , so  JDollarShell is  not  released.


=================================================================================================

Note: If  you  want  learn  more  about  graphics,Animation  , then  focus  JDollarshell Programming Language.

OakJava7  is not  focused   for   Graphics ,Animation. It  is focused  on  MachineLearning,  Datascience  ,Remote X Application, and   web application .This  page is under construction . You can go thru  oakjava7  but don't study Jdollarshell  now..



==============================================================================================