How can we add links an texts from website into our Java program | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

How can we add links an texts from website into our Java program

I want to add some text in my code from many website but it becoming lengthy if I copy the text and paste it in my code line by line

16th Mar 2019, 6:50 AM
Rajb957
Rajb957 - avatar
5 Réponses
+ 4
Raj Bunsha bluej is your IDE the language elements remain the same, I use eclipse and you use bluej we both program in java, but our environments are different.
16th Mar 2019, 11:00 AM
Robert Atkins
Robert Atkins - avatar
+ 12
Best thing to do, because it is independent from ide and gui (but doubt it works on the playground, will test *EDIT: It doesn't work here, unfortunately*): https://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html
16th Mar 2019, 8:11 AM
Tashi N
Tashi N - avatar
+ 10
Oh, and if you just want to open a link: https://stackoverflow.com/questions/10967451/open-a-link-in-browser-with-java-button (Sry, hope I got your question right now)
16th Mar 2019, 8:23 AM
Tashi N
Tashi N - avatar
+ 9
This won't work at the code playground, as the console doesn't support links. You need a gui to do this and gui frameworks aren't supported on SoloLearn. You could create a web code instead tho.
16th Mar 2019, 8:01 AM
Tashi N
Tashi N - avatar
+ 4
I generally do programming in bluej so please send me answer related to it
16th Mar 2019, 8:07 AM
Rajb957
Rajb957 - avatar