JAVA8 Tutorial

JAVA8(OAKJAVA8) Tutorial

Unit-1 : Introduction to JAVA8.0 Programming Language

Definition:

“JAVA8.0 is meant for Code Security, Learnable, Prototype software, Advanced , used in Mobile Web Application and MobileApps development and it symbolizes

penquins symbol, used in applications like MobileApps and Mobile Web Application , used with java/j2ee framework like Struts, spring , hibernate ,etc.”

=========

ABOUT JAVA8.0

in java(jdk1.7) and Dotweb3.0 P.L.

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 venkatraman 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 JAVA8.0 is focused.

So Creating software in C# is useless.

JAVA8.0 is a OAKJAVA8 for creating datastructures and compilers.

JAVA8.0 accepts ".java" filename and translate to .class file.

that java is said to oak java different from orginal java; which is not understood by hackers.

JAVA8.0 loads .dll in memory to create a Prototype software.

Unit-2: Program Structures for OAKJAVA8

=======

SYNTAX-1:

<WEB>

<USE> packages;

<PACK> packagename

{

<CLASS> <classname>

{

public void main()

{

<! source code !>

}

}

}

SYNTAX-2:

Filename.java

=========

class <classname>

{

protected static void main(String args[]) // it means it cannot be run in jdk1.8 compiler

{

<! OAKJAVA8 Logic !>

}

}

JAVA8.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

JAVA8.0(OAKJAVA) PROGRAMMING LANGUAGE

ENDING SECTION : }

Explanation:

JAVA8.0 Programming Language is otherwise known as OAKJAVA (JAVA8) which is invented by wilmix jemin j at year 2014 and 2016

JAVA8.0 Ending section is } ; Ending your JAVA8.0 program Documentation Section means you can include description withcomments.

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

<USE> statement to import all the packages.

Interface statement for supporting multiple inheritance.

JAVA8.0 SYNTAX-2 Program Structure(.java)

LOGIC SECTION

class <classname>

{

protected static void main(String args[])

//if JAVA8.0 used for native purpose then save the file as filename.java7h and donot

//Define main function just define apis…

{

<! source code !>

}

CLOSE LOGIC SECTION

ENDING SECTION : }

JAVA7.0(OAKJAVA) PROGRAMMING LANGUAGE

Explanation:

All JAVA8.0 should start with class <classname>

But protected static void main(String args[]) is used instead for

JAVA8.0 SYNTAX-3 Program Structure

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

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:

JAVA8.0 Ending section is } ; Ending your JAVA8.0 program Documentation Section means you can include description withcomments.

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

<USE> statement to import all the packages.

Interface statement for supporting multiple inheritance.

Logic section for writing JAVA8.0 logic with Class followed by main method . after writing logic close the logic section.

Documentation Section Package Statement; Import Statement;

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

Logic section for writing JAVA8.0 logic with Class followed by main method . after writing logic close the logic section

put it in JSTAR server for futhure use.

UNIT 3

OAKJAVA8 Advanced OOPS

OAKJAVA8 Advanced OOPS

JAVA8.0 Advanced Oops add features like

Operator overloading , friend function,CDollar oops,Gdollar oops,Jstar oops, Chdollar oops , JDk-java oops, and ,Java8.0 oops.

We already know about the concepts like CDollar oops,Gdollar oops,Jstar oops,Chdollar oops. But java developers did not know about Java8.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> CDollar.IO;

<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()

{

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

<PRINTLN>("4 not found");

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

<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());

}

}

}

UNIT-4:OAKJAVA8-PROGRAMS

TreeExample: JAVASwing Program

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

int index = x.indexOf((4)); if (index < 0)

index = x.indexOf((3)); if (index < 0)

import java.awt.BorderLayout; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.JTree;

import javax.swing.SwingUtilities;

import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer;

public class TreeExample extends JFrame

{

private JTree tree;

private JLabel selectedLabel;

public TreeExample()

{

//create the root node

DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");

//create the child nodes

DefaultMutableTreeNode vegetableNode = new DefaultMutableTreeNode("Vegetables"); vegetableNode.add(new DefaultMutableTreeNode("Capsicum")); vegetableNode.add(new DefaultMutableTreeNode("Carrot"));

vegetableNode.add(new DefaultMutableTreeNode("Tomato")); vegetableNode.add(new DefaultMutableTreeNode("Potato"));

DefaultMutableTreeNode fruitNode = new DefaultMutableTreeNode("Fruits"); fruitNode.add(new DefaultMutableTreeNode("Banana"));

fruitNode.add(new DefaultMutableTreeNode("Mango")); fruitNode.add(new DefaultMutableTreeNode("Apple")); fruitNode.add(new DefaultMutableTreeNode("Grapes")); fruitNode.add(new DefaultMutableTreeNode("Orange"));

//add the child nodes to the root node root.add(vegetableNode); root.add(fruitNode);

//create the tree by passing in the root node

tree = new JTree(root);

ImageIcon imageIcon = new ImageIcon(TreeExample.class.getResource("leaf.jpg")); DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); renderer.setLeafIcon(imageIcon);

tree.setCellRenderer(renderer); tree.setShowsRootHandles(true); tree.setRootVisible(false); add(new JScrollPane(tree));

selectedLabel = new JLabel(); add(selectedLabel, BorderLayout.SOUTH);

tree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() { @Override

public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)

tree.getLastSelectedPathComponent(); selectedLabel.setText(selectedNode.getUserObject().toString());

}

});

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setTitle("JTree Example");

this.setSize(200, 200); this.setVisible(true);

}

static void main(String args[])

{

SwingUtilities.invokeLater(new Runnable() { @Override

public void run() { new TreeExample();

}

});

}

}

Now compile the java program Using java8 <filename.java> Afterto convert .dll using

Ikvmc <filename.class> ….

So this statement will convert to .dll format to be used with OAKJAVA8

Enter TreeExample.dll in properties file

So that you can call the api TreeExample.call(); In oakjava8.web which will creates .exefile

Now run the above TreeExample Program to get the following Output…

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

Program -2:oakjava1.java

class oakjava1

{

void display()

{

System.out.println("wilmix is going");

}

}

class oakjava2

{

protected static void main(String args[])

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

{

}

}

Compile the program using

Java8 oakjava1.java

Run the program using

java oakjava1

Output:

Wilmix is going

1) Write a java8.0 program and convert to .dll and create .exe using java8.0 program.

Program -1 : TICTACTOE GAME

GameApplet.java

oakjava1 o = new oakjava1(); System.out.println("Wilmix is going");

import java.applet.Applet; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D;

import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.WindowEvent; importjava.awt.event.WindowListener; import java.io.PrintStream;

import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JOptionPane;

public class GameApplet extends JFrame

implements MouseListener, ActionListener, WindowListener

{

JFrame f; int flag = 2; int n;

int m; int i = 0;

static int bug = 0;

char[] ch = new char[9]; JButton first;

JButton second; String s1 = "";

public GameApplet()

{

this.f = new JFrame("Tic Tac Toe"); this.first = new JButton("CLEAR"); this.second = new JButton("EXIT"); this.f.add(this.first); this.f.add(this.second); this.f.addWindowListener(this);

this.f.getContentPane().setBackground(Color.BLUE); this.f.setLayout(null);

this.f.setVisible(true); this.f.setSize(800, 600);

this.first.setBounds(650, 50, 90, 60);

this.second.setBounds(650, 250, 90, 60);

this.f.addMouseListener(this);

for (this.i = 0; this.i < 9; this.i += 1) this.ch[this.i] = 'B';

this.first.addActionListener(this);

this.second.addActionListener(this);

String message = "Please click on the frame !!!!! \n \nto start the game \n";

JOptionPane pane = new JOptionPane(message);

JDialog dialog = pane.createDialog(new JFrame(), "Dilaog"); dialog.show();

Graphics g = this.f.getGraphics(); g.drawLine(200, 0, 200, 600);

g.drawLine(400, 0, 400, 600);

g.drawLine(0, 200, 600, 200);

g.drawLine(0, 400, 600, 400);

g.drawLine(600, 0, 600, 600);

}

public void keyPressed(KeyEvent k)

{

System.out.print("");

}

public void keyTyped(KeyEvent k) { this.s1 += k.getKeyChar();

}

public void keyReleased(KeyEvent k) { System.out.print("");

}

public void actionPerformed(ActionEvent ae)

{

if (ae.getSource() == this.first)

{

this.f.setVisible(false); bug = 0;

new GameApplet();

}

if (ae.getSource() == this.second)

{

System.exit(0);

}

}

public void windowClosing(WindowEvent de)

{

System.exit(0); }

public void windowOpened(WindowEvent de) { } public void windowClosed(WindowEvent de) { } public void windowActivated(WindowEvent de) { } public void windowDeactivated(WindowEvent de) { } public void windowIconified(WindowEvent de) { } public void windowDeiconified(WindowEvent de) { }

public void mouseClicked(MouseEvent e) { Graphics2D g2; Graphics g = this.f.getGraphics();

g.drawLine(200, 0, 200, 600);

g.drawLine(400, 0, 400, 600);

g.drawLine(0, 200, 600, 200);

g.drawLine(0, 400, 600, 400);

g.drawLine(600, 0, 600, 600);

this.flag -= 1; int x = e.getX(); int y = e.getY(); if (this.flag == 1)

{

if ((x < 200) && (y < 200)) { this.m = 0; this.n = 0; this.ch[0] = 'R'; } if ((x > 200) && (x < 400) && (y < 200)) { this.m = 200; this.n = 0;

this.ch[1] = 'R'; }

if ((x > 400) && (x < 600) && (y < 200)) { this.m = 400; this.n = 0; this.ch[2] = 'R'; }

if ((x < 200) && (y > 200) && (y < 400)) { this.m = 0; this.n = 200; this.ch[3] = 'R'; }

if ((x > 200) && (x < 400) && (y > 200) && (y < 400)) { this.m = 200; this.n = 200; this.ch[4] = 'R'; }

if ((x > 400) && (x < 600) && (y > 200) && (y < 400)) { this.m = 400; this.n = 200; this.ch[5] = 'R'; }

if ((x < 200) && (y > 400) && (y < 600)) { this.m = 0; this.n = 400; this.ch[6] = 'R'; }

if ((x > 200) && (x < 400) && (y > 400) && (y < 600)) { this.m = 200; this.n = 400; this.ch[7] = 'R'; }

if ((x > 400) && (x < 600) && (y > 400) && (y < 600)) { this.m = 400; this.n = 400; this.ch[8] = 'R'; }

g.setColor(new Color(77, 176, 230)); g2 = (Graphics2D)g;

g2.setStroke(new BasicStroke(10.0F)); g.drawOval(this.m + 10, this.n + 10, 159, 159);

}

if (this.flag == 0)

{

if ((x < 200) && (y < 200)) { this.m = 0; this.n = 20; this.ch[0] = 'P';

}

if ((x > 200) && (x < 400) && (y < 200)) { this.m = 200; this.n = 20; this.ch[1] = 'P'; }

if ((x > 400) && (x < 600) && (y < 200)) { this.m = 400; this.n = 20; this.ch[2] = 'P'; }

if ((x < 200) && (y > 200) && (y < 400)) { this.m = 0; this.n = 200; this.ch[3] = 'P'; }

if ((x > 200) && (x < 400) && (y > 200) && (y < 400)) { this.m = 200; this.n = 200; this.ch[4] = 'P'; }

if ((x > 400) && (x < 600) && (y > 200) && (y < 400)) { this.m = 400; this.n = 200; this.ch[5] = 'P'; }

if ((x < 200) && (y > 400) && (y < 600)) { this.m = 0; this.n = 400; this.ch[6] = 'P'; }

if ((x > 200) && (x < 400) && (y > 400) && (y < 600)) { this.m = 200; this.n = 400; this.ch[7] = 'P'; }

if ((x > 400) && (x < 600) && (y > 400) && (y < 600)) { this.m = 400; this.n = 400; this.ch[8] = 'P'; }

g2 = (Graphics2D)g;

g2.setStroke(new BasicStroke(10.0F)); g.setColor(new Color(77, 176, 230));

g.drawLine(this.m + 10, this.n + 13, this.m + 169, this.n + 164);

g.drawLine(this.m + 169, this.n + 10, this.m + 10, this.n + 169);

this.flag += 2;

}

for (this.i = 0; this.i < 3; this.i += 1)

{

if ((this.ch[this.i] != 'B') &&

(this.ch[(this.i + 3)] == this.ch[this.i]) && (this.ch[(this.i + 6)] == this.ch[this.i]))

{

new j.Board().win(); bug = 1;

}

}

for (this.i = 0; this.i < 7; this.i += 1)

{

if (this.ch[this.i] != 'B')

{

if ((this.ch[this.i] == this.ch[(this.i + 1)]) && (this.ch[this.i] == this.ch[(this.i + 2)]))

{

new j.Board().win(); bug = 1;

}

this.i += 2;

}

else {

this.i += 2;

}

}

if ((this.ch[4] != 'B') && ((

((this.ch[0] == this.ch[4]) && (this.ch[4] == this.ch[8])) ||

((this.ch[2] == this.ch[4]) && (this.ch[4] == this.ch[6])))))

{

new j.Board().win(); bug = 1;

}

for (this.i = 0; (this.i < 9) && (this.ch[this.i] != 'B'); this.i += 1)

{

if (this.i == 8)

{

if (bug == 0)

new j.Board().draw();

bug = 0;

}

}

}

public void mouseReleased(MouseEvent e)

{

System.out.print("");

}

public void mouseEntered(MouseEvent e)

{

System.out.print("");

}

public void mouseExited(MouseEvent e) { System.out.print("");

}

public void mousePressed(MouseEvent e) { System.out.print("");

}

public static void call()

{

new GameApplet();

}

}

TicTacToGame.web

<WEB>

<USE> System;

<USE> System.Windows.Forms;

<PACK> Games

{

<CLASS> Tictactoegame

{

public void main()

{

GameApplet.call();

}

}

}

OUTPUT

2)

<WEB>

<USE> <CDOLLARS>.util;

<USE> Security;

<PACK> Program8

{

<CLASS> Prog

{

public void main()

{

String t="";

ArrayList arm1 = new ArrayList();

arm1.add("uname");

arm1.add("psw");

arm1.add("!");

// add fields in html form ie) html form contains 2 fields

// they are uname ,psw.

ArrayList armg= Request.Query(arm1,"Registeruser.j.dsn",3,1);

//load the response data of form from Registeruser.dsn

// using Request.Query API will return an arraylist format

wdbaconn.JSTARWDBAQUERY("datastores", "USEDATABASE", "dbpwds", "C:\\Programs\\WNOSQL\\WNOSQLProgramfiles\\WNOSQL-cod");

wdbaconn.JSTARWDBAUSERQUERY("dbuser", "dbpwds", "wilmix78", "wilmix78");

// create table RegisterJava7p3 with 2 fields name and pwd

String q = "CREATETABLE from RegisterJava7p3 0 to 0 , 1 to 5 ?= 6639 By 6639 f(x) : {NAME,PWD} : {} :{2,4}";

wdbaconn.WDBAQUERY(q);

t=armg.get(0).ToString()+","+armg.get(1).ToString();

// insert the values into RegisterJava7 ie) username and password

String s12 ="INSERTINTO from RegisterJava7p3 2 to "+2+" , 1 to 5 ?= A By 1 1 : {0} : {"+t+"} : {0}";

wdbaconn.WDBAQUERY(s12);

// list the RegisterJava8p3 contents

String qh2="SELECTRVAL from RegisterJava7p3 2 to 6 , 1 to 5 ?= A By 1

1 : {0} : {0} :{0}";

wdbaconn.WDBAQUERY(qh2);

<TRY>

{

String s=Secure.RetreiveSecure("output.wdba" ,0); //retrieve the

//query output from wdba file s=s.Replace("[","").Replace("]","");

string []ename = s.Split(' ');

//split by spaces

int lengthA = ename.Length;

<PRINTLN>(" <html>");

<PRINTLN>(" <form>");

<PRINTLN>(" <Table bgcolor=gold>");

for (int i=0;i<lengthA;i+=3)

{

//print the contents

<PRINTLN> ("<tr>");

<PRINTLN> (" <td>"+ename[i]+"</td>");

<PRINTLN> ("<td>"+ename[i+1]+"</td>");

<PRINTLN>(" <td>"+ename[i+2]+"</td>");

<PRINTLN>(" </tr>");

}

<PRINTLN>(" </table>");

<PRINTLN>(" </form>");

<PRINTLN>(" </html>");

}

<CATCH>(<EXE> e)

{

}

}

}

}

Developer Exercises

A) Write a java8.0 Program to count no

Of words ,line in a given text and store the details In wnosql database.

Delete a employee details and update the employee details. Use JAVA8.0 with hibernate.

B) Write a JAVA8.0 Program to read an employee,

C) Create a Shooting ballons game with

Toy name pravin . If Pravin shoots 25 balloons With in 15 minutes then the Pravin is awarded 50 points score. If pravin toy did not shoot Balloons then he is awarded 0points.

D) Create a JAVASWING Calculator Using JAVA8.0

E) Insert ,list studentdetails using Oracle db using Java8.0

JAVA8.0(OAKJAVA) PROGRAMMING LANGUAGE

UNIT-5 :OAKJAVA8(JAVA8) with JAVA/J2ee Framework with Scroll Framework.

Sample-1

==========

<SCROLL>

public class <ProgramName> {

static void main(String args[])

{

<! Scroll Logic !>

}

}

</SCROLL>

Program-1

==========

<SCROLL>

public class index {

static void main(String args[])

{

HTML.displayhtml("Register.html");

}

}

</SCROLL>

Output in Samsung mobiles is

SAMPLE-2

2) Write a OAKJAVA8(JAVA8) program for Publishing Invoice Bill in Mobiles..:-

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

<WEB>

<USE> <CDOLLARS>.util; // load cdollar packages

<USE> Security; // load security packages

<USE> CDollar.WDBA; //load cdollar.wdba wnosql packages

<USE> WDBA; // load wnosql packages

<PACK> Program8

{

<CLASS> Prog

{

public void main()

{

ArrayList arm1= new ArrayList();

// add the parameters in ArrayList

arm1.add("CADDRESS");

arm1.add("invoiceno");

arm1.add("invoicedate");

arm1.add("reversecharge");

arm1.add("state");

arm1.add("code");

arm1.add("name");

arm1.add("BADDRESS");

arm1.add("gstin");

arm1.add("state1");

arm1.add("code1");

arm1.add("sno");

arm1.add("productdescription");

arm1.add("hsncode");

arm1.add("qty");

arm1.add("rate");

//arm1.add("amt");

arm1.add("discount");

arm1.add("rate1");

//arm1.add("amt1");

arm1.add("rate2");

//arm1.add("amt2");

arm1.add("Amountinwords");

arm1.add("bname");

arm1.add("bankaccount");

arm1.add("bankifsc");

arm1.add("NOT");

<PRINTLN>("<HTML>");

<PRINTLN>("<head> <style>");

<PRINTLN>("table {");

<PRINTLN>(" width:100%;");

<PRINTLN>("}");

<PRINTLN>("table, th, td {");

<PRINTLN>("border: 1px solid black;");

<PRINTLN>(" border-collapse: collapse;");

<PRINTLN>("}");

<PRINTLN>("th, td {");

<PRINTLN>(" padding: 5px;");

<PRINTLN>(" text-align: left;");

<PRINTLN>("}");

<PRINTLN>("table#t01 tr:nth-child(even) {");

<PRINTLN>(" background-color: grey;");

<PRINTLN>("}");

<PRINTLN>("table#t01 tr:nth-child(odd) {");

<PRINTLN>("background-color:yellow;");

<PRINTLN>("}");

<PRINTLN>("table#t01 th {");

<PRINTLN>(" background-color: black;");

<PRINTLN>("color: white;");

<PRINTLN>("}");

<PRINTLN>("</style>");

<PRINTLN>("</head>");

<PRINTLN>("<BODY >");

<PRINTLN>("<form>");

// Get The post response from form Invoicebill

//with 23 fields..

ArrayList armg= Request.Query(arm1,"Invoicebill.cl.dsn",23,1);

// store the values in the variable;

string CADDRESS=armg.get(0).ToString();

string invoiceno=armg.get(1).ToString();

string invoicedate=armg.get(2).ToString();

string reversecharge=armg.get(3).ToString();

string state=armg.get(4).ToString();

string code=armg.get(5).ToString();

string name=armg.get(6).ToString();

string BADDRESS=armg.get(7).ToString();

string gstin=armg.get(8).ToString();

string state1=armg.get(9).ToString();

string code1=armg.get(10).ToString();

string sno=armg.get(11).ToString();

string productdescription=armg.get(12).ToString();

string hsncode=armg.get(13).ToString();

string qty=armg.get(14).ToString();

string rate=armg.get(15).ToString();

//string amt=armg.get(16).ToString();

string discount=armg.get(16).ToString();

string rate1=armg.get(17).ToString();

//string amt1=armg.get(19).ToString();

string rate2=armg.get(18).ToString();

//string amt2=armg.get(21).ToString();

string Amountinwords=armg.get(19).ToString();

string bname=armg.get(20).ToString();

string bankaccount=armg.get(21).ToString();

string bankifsc=armg.get(22).ToString();

<PRINTLN>("<table id=t01 width=1027 height=210 border=1 bgcolor=#fff >");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td height=135><div align=center><strong><address> ");

<PRINTLN>(""+CADDRESS);

<PRINTLN>("</address></strong></div></p> <p align=right><strong>Triplicate for</strong></p>");

<PRINTLN>(" <p align=right><strong>Supplier</strong></p></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td><div align=center><span <CLASS>=style12>Tax Invoice</span></div></td>");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td width=506><strong>Invoice No: </strong>"+invoiceno+"</td> ");

<PRINTLN>("<td width=503></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>("<td><strong>Invoice date: </strong>"+invoicedate+"</td> ");

<PRINTLN>("<td>&nbsp;</td> ");

<PRINTLN>("</tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=436><strong>Reverse Charge(Y/N):</strong>"+reversecharge+"</td> ");

<PRINTLN>(" <td width=63>&nbsp;</td> ");

<PRINTLN>(" <td width=505>&nbsp;</td> ");

<PRINTLN>("</tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=337><strong>State:</strong>"+ state+"</td> ");

<PRINTLN>("<td width=94><strong>Code </strong></td> ");

<PRINTLN>(" <td width=63>&nbsp;"+code+"</td> ");

<PRINTLN>(" <td width=504>&nbsp;</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff>");

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=506><div align=center <CLASS>=style13>Bill to Party </div></td> ");

<PRINTLN>(" <td width=503><div align=center><span <CLASS>=style13>Ship to party </span></div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=506><strong>Name:</strong>"+name+"</td> ");

<PRINTLN>(" <td width=505><strong>Name:</strong>"+name+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td><strong>Address:</strong>"+ BADDRESS+"</td> ");

<PRINTLN>(" <td><strong>Address:</strong>"+ BADDRESS+"</td> ");

<PRINTLN>("</tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td><strong>GSTIN:</strong>"+gstin+"</td> ");

<PRINTLN>(" <td><strong>GSTIN:</strong>"+gstin+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td width=340><strong>State:</strong>"+state1+"</td> ");

<PRINTLN>(" <td width=98><strong>Code:</strong></td> ");

<PRINTLN>(" <td width=54>&nbsp;"+code1+"</td> ");

<PRINTLN>(" <td width=380><strong>State:</strong>"+state1+"</td> ");

<PRINTLN>(" <td width=76><strong>Code:</strong></td> ");

<PRINTLN>(" <td width=39>&nbsp;"+code1+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td width=24 height=68><span <CLASS>=style8>S.NO</span></td> ");

<PRINTLN>(" <td width=130> <div align=center <CLASS>=style7>Product Description </div></td> ");

<PRINTLN>(" <td width=41><p <CLASS>=style6>HSNCode</p> </td> ");

<PRINTLN>(" <td width=49><div align=center <CLASS>=style6>Qty</div></td> ");

<PRINTLN>("<td width=73><div align=center <CLASS>=style6>Rate</div></td> ");

<PRINTLN>(" <td width=97><div align=center <CLASS>=style6>Amt</div></td> ");

<PRINTLN>(" <td width=54><div align=center><span <CLASS>=style1><strong>Discount</strong></span></div></td> ");

<PRINTLN>(" <td width=75><span <CLASS>=style6>TaxableValue</span></td> ");

<PRINTLN>(" <td width=134><table id=t01 width=210 border=1> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td width=200><div align=center <CLASS>=style4>CGST</div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td><table id=t01 width=200 border=1 bgcolor=#fff> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td><div align=center <CLASS>=style7>Rate</div></td> ");

<PRINTLN>(" <td><span <CLASS>=style7>Amt</span></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" </table></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" </table></td> ");

<PRINTLN>("<td width=160><table id=t01 width=200 border=1> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td><div align=center <CLASS>=style4>SGST</div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>("<td><table id=t01 width=200 border=1 bgcolor=#fff> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td><div align=center <CLASS>=style6>Rate</div></td> ");

<PRINTLN>(" <td><span <CLASS>=style6>Amt</span></td> ");

<PRINTLN>("</tr> ");

<PRINTLN>(" </table></td> ");

<PRINTLN>("</tr> ");

<PRINTLN>(" </table></td> ");

<PRINTLN>(" <td width=110><div align=center <CLASS>=style4>TOTAL</div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td align=right width=24><p>&nbsp;"+sno+"</p> ");

<PRINTLN>("<td align=right width=93>&nbsp;"+productdescription+"</td> ");

<PRINTLN>(" <td align=right width=54 >&nbsp;"+hsncode+"</td> ");

<PRINTLN>(" <td align=right width=38 >&nbsp;"+qty+"</td> ");

<PRINTLN>(" <td align=right width=50 >&nbsp;"+rate+"</td> ");

//double tax2 = 0.0;

//double totalamount = 0.0;

double amount =(Convert.ToDouble(qty)) * (Convert.ToDouble(rate));

double amount1= ((Convert.ToDouble(rate1)/100) * Convert.ToDouble(amount));

double amount2= ((Convert.ToDouble(rate2)/100) * Convert.ToDouble(amount));

<PRINTLN>(" <td align=right width=65 >&nbsp;"+amount+"</td> ");

<PRINTLN>(" <td align=right width=49 >&nbsp;"+discount+"</td> ");

<PRINTLN>(" <td align=right width=74 >&nbsp;"+amount+"</td> ");

<PRINTLN>("<td align=right width=85>&nbsp;"+rate1+"</td> ");

<PRINTLN>("<td align=right width=99>&nbsp;"+amount1+"</td> ");

<PRINTLN>(" <td align=right width=85 >&nbsp;"+rate2+"</td> ");

<PRINTLN>(" <td align=right width=85>&nbsp;"+amount2+"</td> ");

double totalamount= amount+amount1+amount2;

<PRINTLN>(" <td align=right width=85>&nbsp;"+totalamount+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 height=65 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=134><div align=center <CLASS>=style9><strong>TOTAL</strong></div></td> ");

<PRINTLN>(" <td width=47>&nbsp;</td> ");

<PRINTLN>(" <td width=37>"+qty+"</td> ");

<PRINTLN>(" <td width=51>&nbsp;</td> ");

<PRINTLN>(" <td width=74><div align=center>"+amount+"</div></td> ");

<PRINTLN>("<td width=65><div align=right>"+discount+"</div></td> ");

<PRINTLN>(" <td width=43><div align=right>"+amount+"</div></td> ");

<PRINTLN>("<td width=103>&nbsp;</td> ");

<PRINTLN>("<td width=101><div align=right>"+amount1+"</div></td> ");

<PRINTLN>(" <td width=205><div align=right>"+amount2+"</div></td> ");

<PRINTLN>(" <td width=95><div align=right>"+totalamount+"</div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td width=487><div align=center><strong>Total Invoice amount in words </strong></div></td> ");

<PRINTLN>("<td width=88 <CLASS>=style15><span <CLASS>=style21>Total Amount Before Tax: </span></td> ");

<PRINTLN>(" <td <CLASS>=style15>&nbsp;"+amount+"</td> ");

<PRINTLN>("</tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>("<td><div align=center><input type=text name=words> </div></td> ");

<PRINTLN>("<td><table id=t01 width=544 border=1 bgcolor=#fff> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td width=420 <CLASS>=style15><strong>Add: CGST </strong></td> ");

<PRINTLN>(" <td width=88 <CLASS>=style15>&nbsp;"+amount1+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>("<td <CLASS>=style15><strong>Add:SGST</strong></td> ");

<PRINTLN>(" <td <CLASS>=style15>&nbsp;"+amount2+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td <CLASS>=style15><strong>Total Tax Amount: </strong></td> ");

<PRINTLN>(" <td <CLASS>=style15>&nbsp;"+(amount1+amount2)+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td <CLASS>=style15><strong>Total Amount After Tax: </strong></td> ");

<PRINTLN>(" <td <CLASS>=style15>&nbsp;"+totalamount+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td width=196><strong>GST on Reverse Charge </strong></td> ");

<PRINTLN>(" <td width=254>&nbsp;"+reversecharge+"</td>");

<PRINTLN>(" </tr> ");

<PRINTLN>(" </table></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=1027 border=1 bgcolor=#fff> ");

/*

<PRINTLN>("<tr> ");

<PRINTLN>("<td width=333 height=563 ><label> ");

<PRINTLN>("<div align=center <CLASS>=style9>Bank Details </div> ");

<PRINTLN>(" <table id=t01 width=336 border=1> bgcolor=#f1f1c1");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td><strong>Name:</strong>"+bname+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td><strong>Bank A/c: </strong>"+bankaccount+"</td> ");

<PRINTLN>("</tr> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td><strong>Bank IFSC: </strong>"+bankifsc+"</td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" </table></label></td> ");

<PRINTLN>(" <td id=t01 width=146><p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>(" <p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<table id=t01 width=200 height=112 border=1 bgcolor=#f1f1c1> ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <th scope=row>&nbsp;</th> ");

<PRINTLN>(" </tr> ");

<PRINTLN>(" </table> ");

<PRINTLN>(" <p align=center><strong>Common Seal </strong></p></td> ");

<PRINTLN>("<td width=522 ><table width=466 border=1 bgcolor=#f1f1c1 > ");

<PRINTLN>(" <tr> ");

<PRINTLN>(" <td width=196><strong>GST on Reverse Charge </strong></td> ");

<PRINTLN>(" <td width=254>&nbsp;"+reversecharge+"</td>");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<table id=t01 width=468 height=179 border=1 bgcolor=#f1f1c1> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td><div align=center><em>Certified that the particulars given above are true and correct </em></div></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>(" <p align=center><strong>For Marujyu Technology India Pvt Ltd </strong></p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p align=center <CLASS>=style16>Authorised signatory </p> ");

<PRINTLN>(" <table id=t01 width=467 height=182 border=1 bgcolor=#f1f1c1> ");

<PRINTLN>("<tr> ");

<PRINTLN>(" <td ><span <CLASS>=style19></span></td> ");

<PRINTLN>(" </tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>(" <p>&nbsp;</p> ");

<PRINTLN>(" <p>&nbsp;</p> ");

<PRINTLN>(" <p>&nbsp;</p></td> ");

<PRINTLN>("</tr> ");

<PRINTLN>("</table> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("<p>&nbsp;</p> ");

<PRINTLN>("</form></body> ");

<PRINTLN>("</html> ");

*/

<PRINTLN>("<table width=1027 border=1 bgcolor=#fff>");

<PRINTLN>("<tr>");

<PRINTLN>("<td width=294 height=203><table width=296 height=216 border=1 bgcolor=#fff>");

<PRINTLN>("<tr>");

<PRINTLN>(" <td width=238><div align=center><strong>Bank Details </strong></div></td>");

<PRINTLN>(" </tr>");

<PRINTLN>(" <tr>");

<PRINTLN>(" <td><strong>Name:</strong>"+bname+"</td>");

<PRINTLN>("</tr>");

<PRINTLN>("<tr>");

<PRINTLN>("<td><strong>Bank A/C: </strong>"+bankaccount+"</td>");

<PRINTLN>("</tr>");

<PRINTLN>("<tr>");

<PRINTLN>(" <td><strong>Bank IFSC: </strong>"+bankifsc+"</td>");

<PRINTLN>("</tr>");

<PRINTLN>("<tr>");

<PRINTLN>(" <td height=61>&nbsp;</td>");

<PRINTLN>("</tr>");

<PRINTLN>("</table></td>");

<PRINTLN>("<td width=163><table width=200 height=231 border=1 bgcolor=#fff>");

<PRINTLN>("<tr>");

<PRINTLN>(" <td height=121>&nbsp;</td>");

<PRINTLN>("</tr>");

<PRINTLN>("<tr>");

<PRINTLN>("<td height=102><div align=center class=style22>Common Seal </div></td>");

<PRINTLN>(" </tr>");

<PRINTLN>("</table></td>");

<PRINTLN>("<td width=551><table width=514 height=224 border=1 bgcolor=#fff>");

<PRINTLN>("<tr>");

<PRINTLN>(" <td><div align=center><em>Certified that the particulars given above are true and correct </em></div></td>");

<PRINTLN>("</tr>");

<PRINTLN>("<tr>");

<PRINTLN>("<td><div align=center><strong>For Marujyu Technnology India (p) Ltd </strong></div>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p align=center class=style13>Authorised signatory </p></td>");

<PRINTLN>("</tr>");

<PRINTLN>("</table></td>");

<PRINTLN>("</tr>");

<PRINTLN>("</table>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("<p>&nbsp;</p>");

<PRINTLN>("</body>");

<PRINTLN>("</html>");

//Database name as datastores , path as

String g = WDBASQL.WDBASQLS("datastores", "USEDATABASE", "dbpwds", "C:\\Programs\\WNOSQL\\WNOSQLProgramfiles\\WNOSQL-cod");

//dbuser as usertable and dbpwds as password table and wilmix78 as userid and password respectively

String t = WDBASQL.WDBASQLS("dbuser", "dbpwds", 1, "wilmix78", "wilmix78", 1, 5, g);

// create table invoicebill as two partitions InvoiceBill,InvoiceBill2 respectively...

String q = "CREATETABLE from Invoicebill 0 to 0 , 1 to 5 ?= 6639 By 6639 f(x) : {CADDRESS,INO,IDATE,Charge,State,code1,Name,Address,GSTIN,State,code2,sno,productdesc,hsncode,qty}: {} :{2,4}";

String q1 ="CREATETABLE from Invoicebill2 0 to 0 , 1 to 5 ?= 6639 By 6639 f(x) : {rate,Amt,discount,Rate1,Amt1,Rate2,Amt2,total,ReverseCharge,Bankname,BankAccount,BankIFSC}: {} :{2,4}";

wdbaconn.WDBAQUERY(q);

wdbaconn.WDBAQUERY(q1);

Char c= ' ';

// calculate the table size for InvoiceBill and InvoiceBill2

ArrayList datas1=WDBASQL.Query("TABLESIZE()","Invoicebill","0",null,27,"","", null,"",0,"","",c,null,t,1,5);

ArrayList datas11=WDBASQL.Query("TABLESIZE()","Invoicebill2","0",null,27,"","", null,"",0,"","",c,null,t,1,5);

String t1="";String t2="";

t1=CADDRESS+","+invoiceno+","+invoicedate+","+reversecharge+","+state+","+code+","+name+","+BADDRESS+","+gstin+","+state1+","+code1+","+sno+","+productdescription+","+hsncode+","+qty;

t2=rate+","+amount+","+discount+","+rate1+","+amount1+","+rate2+","+amount2+","+totalamount+","+reversecharge+","+bname+","+bankaccount+","+bankifsc;

// Insert the values in to Invoicebill and InvoiceBill2 repectively...

String s12 ="INSERTINTO from Invoicebill 0 to "+datas1.size()+" , 1 to 5 ?= A By 1 1 : {0} : {"+t1+"} : {0}";

wdbaconn.WDBAQUERY(s12);

String s121 ="INSERTINTO from Invoicebill2 0 to "+datas11.size()+" , 1 to 5 ?= A By 1 1 : {0} : {"+t2+"} : {0}";

wdbaconn.WDBAQUERY(s121);

}

}

}

Output of the Mobiles is