this seems fairly strange logic to program because it only applies to the second token if it has a value of "^glucose visual". if you subdivide tokens based on a space char, you would end up with
blood
pressure
glucose
visual
your going to check for this condition yourself i.e...
when your applet is loaded, the init method is called. check if the threads are running before you create new threads ie myThread.isAlive()
or destroy the thread before creating it. do this by having a boolean member variable in your thread class. check when this is true to stop your thread
synchronized methods only prevent more than one thread from accessing the same method at the same time, not another method. you will have to define the class a synchronized, not 100% sure about that, or set up a flag to prevent access to other methods
all servlets run on the server so to create a .js file all you have to do is
FileOutputStream js = new FileOutputStream( "c:\where\ever\u\want\to\put\the\file\countries000x.js" );
this will create the file. all you have to do is store the name of this file somewhere in your app and...
a little trick to get your classpath working, add . as the first entry in your classpath variable. this means the current folder will always be in the classpath.
so you should have the following in your classpath now
classpath=.;c:\java
give that a try
yes, leave your class path at c:\java.
you can have either Java or MyClass as your package name, it doesn't matter as long as the case is the same for the folder name as it is in your source.
once your class path is set and you have compiled your program, you can access it from anywhere in you...
the best way to explain this is like so: package java implies that your code will be found in the classpath if a folder called java exists when appended to the classpath
what your compiler is actually looking for is
c:\java\java
the second java being your package, the first set in the...
no, there is no difference between the two. the import statement is required to during compilation so the compiler can varify your code against the external packages you wish to use. the size of the resultant class file won't be any different after compilation
try this.
create a data object containing all the data displayed initially to the user. call this a User object or something. define all your own data type. use strings, its easier. store this locally.
let the user update whatever. read this data back from the user into a new data object...
one word. Mocha. do a search for it on any search engine. its available for free
Its the original decompiler for class files and works pretty well although due to its age, code can now be protected from it.
you should have two push methods to add something to the stack i.e.
public void push( int a )
and
public void push( char a )
but you will have to decide between either int or char for the pop method as you can't overload methods based on their return type
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.