LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
good for some basic starting, but for those intresed in a dive in the sea of java programming on linux go to tutorials at sun.java.com and start hunting.
It is best to download jdk for linux from sun and code in vi/vim/gvim and compile and run from console.
Beginners shall have a great time deciphering the myteries. Do also remember to view the API of your specific jdk version download at sun. The API is what i will call the java programmers bible.
I've worked all the example programs up to class moon.The class moon program won't compile. I get:
ex6.java:16: cannot resolve symbol
symbol : method readline()
location: class java.io.BufferedReader
Then there is a ^ under the first new in the following line:
String strA = new BufferedReader(new InputStreamReader(System.in)).readLine();
Just wondering why it won't compile. No big deal, but a reply would be interesting.-- Thanks- Larry (I haven't been able to solve this problem)
--------------------------
first have you copy pasted teh moon d\code and tried it out bcos it works i have tried that with jdk 1.5 version it compiled perfectly
if the error is still there just try to resolve the method bcos readline() is a method availbale in BufferReader , so check first check by just calling by BufferReader object
are java commands in linux different from the java commands in windows?
99% of the time, no, however there may of course be certain situations where a program has been written for linux which will not compile/run on windows because some platform-specific code exists - it could be something as simple as a file location - a hard-coded /home/me/file.txt ain't going to get you far in windows.
When you test b == 0, you declare the b statement be b = a - c instead of b = c - a
Considering a squared plus b squared equal c squared, C is always larger than A or B,
wouldn't this fact mitigate the need to test either A or B for a negative value? The
text book example of a right triangle is a=3, b=4, c=5; squared, 9=25-16 and 16=25-9
Any number squared becomes a positive. You only subtract a smaller square from a
larger square. It should be impossible for the difference to ever be a negative
value.
Considering a squared plus b squared equal c squared, C is always larger than A or B,
wouldn't this fact mitigate the need to test either A or B for a negative value?
There is nothing in the code that constrains C to be the hypotenuse (the side opposite the right angle, i.e. the longest side). Suppose the user enters a=5, c=3.
Distribution: Ubuntu, Kali, CentOS, Mac OSX, Windows 10
Posts: 3
Rep:
FFW To the future!!!
I have been learning Java through Udemy lately. Anyone have a recommendation for applying Java to mobile development?
Im really loving this Java stuff a lot, and looking forward to learning and applying it even more!!! Maybe I can develop
my own mobile app to help my students learn physics!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.