I am working on a Phonegap application . Here I want to access java variables in javascript code .I can access functions from javacode to javascript code here.So I think it should be possible to access java variables from javacode to javascript code . How can I do that . I have visited many post on Overflow but did't help .
I am putting sample code here .
JavaCode
class A
{
String a, b ;
A()
{
a = "phonegap";
b= "application" ;
}
}
Javascript Code :
<HTML>
<script type= "text/javascript">
//Here I want to access java variables a and b .
</script>