Hi this is sharing.
Howard Dean welcome to the next part of this video series of ended operability.
Now in this video we will check out their demo.
So here are the intelligent ID.
I have my first dog guilty Plus right now is this.
I am having a mean function now down the side.
I will simply define one more function of add let's say and be of their type of n and then be of their
type of end.
And now this will simply return in value.
So here I was simply return the sum of A-plus B which is actually the endangered value.
Now here inside the source code I will simply create my java file scholar guys legacy my java file
and make sure it is of the class.
OK and this will simply create a public loss of my file.
Now insert this ask for a job.
We all know we have to define a public static void main method which is actually the entry point of
any Java called string or Geass right now.
If you compare my java files or Java and this my first dog guilty you will find the main method in both
the keys.
This is a main method and also here I have the main method now here.
My objective is to call this argument third from inside my java file.
But before that let us understand how Java is simply interpreted this fight so here after the code is
compiled our the content of my first hundred guilty file will simply converted into this public class.
My first get the right so by default we will get a clause inserted which we will have our main method
and also the AG method.
So here I was simply to find my main method as public static void main string is similar to what we
have in case of my original file.
So this method function main arguments at a string is actually converted into this when public static
void main string energy is now similar to this.
We also have an argument here that will be again converted into the Java syntax.
So here we have the augmented public static in ag India and integer beat.
So here I have the return type of end.
And here we have the return type of end.
Right here we have two meters.
And here again we have to be meters.
And again we are returning the sum of LSP.
Right.
So this is how the Java looks at these four lines of code.
That is a function name and function.
And now now since now we know that we're actually having this code internally.
So from the Major I will file inside the main function.
I can simply call let's see the name of the class Lerche see my first K-T dart class.
Right.
So this is actually the auto generated class name inside which we have two methods of large c mean and
add.
So the intellisense will simply show you these two options.
So all our destiny is to call this method and let us call.
Let's see three and four letters are these two numbers.
And here I am simply following the Java syntax by adding a semi-colon to end the expression.
Now let us use in some equal to this function.
And now here I will simply print out such as system doled out.
Got burned.
Ellen printing some from the Javal file and simply print the value of the sum right.
And now here are the top board.
I really do.
I would simply click on this icon to run the code simply in my java file got mean mattered and in the
output we have printing some from Javal file as 7 right.
So this is how we access a method inside the Cartland Plus from inside the Java class and now similarly
can we access the Java metters from within the Cartland file.
The answer to this is is not a force.
If I define a method here let's say public static get edia offered a bangle large C and land and end
but and then simply return L into B side.
And now here I forgot to give the return type as in.
And now this method can be accessed from inside the Garling file using the same syntax such as from
inside the main method.
I would simply call sorry that area equally to my java file which is our class name Dorte get area and
assembly parts like Saillant as then and then bred as 5.
And now here I would simply call Parentline printing area from the coffin file and now simply replace
it by area.
So here we are simply printing the area of the rectangle by calling a method present inside the file
of dord job or failure.
That is this file.
Right and now later than an hour Kerguelen called so here simply click on it and simply click on it
and my first duty.
Like with any Cartland file.
So in the outward Vigoda printing area from the Gorlin file that is fifty eight.
So in this way we can have both Cartland and also the Javal file inside the same application.
And now let us try something different.
Now suppose from the Javal file we are actually using my first guilty which is the standard naming convention
that the compiler followed.
I had my first KTAR clause is getting converted during the completion.
Now suppose if I use the syntax are there to help.
Let's see our data file and then DVM name and as a parent meter Let's say you it a name as my custom
Cartland find.
But right now what happens is that the compiler will simply give this file name while converting into
the byte code as my custom Cartland filename.
Right now if you want to access these methods so what will happen is that instead of calling my first
security you have to simply use this syntax.
So Control-C and here Lichtenstein's that come in by this one.
And now next inside my file you have to simply use it shows some error.
So here you have to simply use my custom Cartland file name dot AG.
So now onward our Codlin file is now having the wrapper of the class name of my custom Codlin filename
which we have defined are the file level here.
And now let us run our Java code by simply running the main function.
So here we go printing some from the Javal file as 7 right.
So the record is now working perfectly fine.
And now Valter about the packages.
Now this is these two files are actually present directly inside the source folder.
Now if I want to create Lhotse a new package and Lipsey learned Scollard has gone toward my Java here.
OK and now simply drag and drop this major VO file into this package resected and now here.
If you notice inside the mind my devil find are Java here.
I have the package of gone Daut my Java.
So this file is now a part of this package.
And now here does create one will package and it a scholar has gone.
Got my Cartland will be restored.
All our Codling fails and I simply drag and drop the curtain in-phase inside my Cartland package and
then in fact it so inside my first d'arte Katie.
You will find the package name has gone dark.
My Cartland And now if you are busy.
Here we are simply imported the package of Gorme dog.
My java dog my java file.
So here goes.
Remove it as of now and let's see what happens.
So here it simply shows some error and resolve file late undesired class name.
So here I will simply press it.
Now whenever there is some error in case of intelligent Id simply place or take place and work on it.
Let's enter and hit on import.
So the endless ID will simply import the required package for you and now Next inside major I will file
again.
We have some error cannot resolve this last name.
So again Vawter do.
Simply replace it.
And so here I have that complete import package has gone Dord my Cartland Dord make us from Codling
filename right and now if you run the code then also the cord will work perfectly fine in both the files.
So here we go.
Our code is still working perfectly fine so this is how we actually create the packages in case of Cartland.
And we can store both the java file and also the Cartland file within the same application.
So this is how we are going to work.
In case of Android as well.
So thanks for watching and have a good day and see you guys in the next video.
Thank you.