+ 8
Is there any simple way to create packages in Java?
I'm asking it, because in YouTube videos, they are confusing me with this, super and constructors.
20 Respuestas
+ 11
@Ajay I have school.
+ 10
@Ajay "Ajay : The FreeLancer" nice! ^_^ when did you get this new title??
+ 5
sorry Luka, but that was odd place for me 🐕
+ 5
because I have no tag of any organizations or company etc.
+ 5
Sorry Myrna Lacson,
but your program is something extraordinary for me.
but I think you should try to pass all three values as parameters on compute() method.
+ 4
what book I prefer to learn basics?
+ 4
thanks for help Luka
+ 4
Packages in Java?
Very useful for structuring your projects.
Your public classes have filenames matching the classname, e.g.
Test.java contains a public class Test
Packages behave the same, just with folders.
(Packages should be named after a TLD you own...)
An example:
If the backend from SoloLearn runs on Java, they have packages starting with:
com.sololearn
and if there is one class Main
it looks like
package com.sololearn;
public class Main { .......
and it is in a file in the sourcetree:
/somewhereInTheFilesystem/com/sololearn/Main.java
+ 3
HI
+ 3
Valentine, I have to discuss with you something strange.
+ 3
please come
+ 3
yup
+ 3
did you get that problems?
+ 3
thanks bem, your answer was so helpful for me
+ 2
You can use Ant builder if you are begginer.
For a little bit bigger projects I recommend using Maven.
For enterprise applications, use Gradle.
If you want to become freelancer, you truly need to know how to pack your classes.
If you asking about packages in project structure... You just create new folder in your project main folder.
+ 2
I cant get the average. someone help me. thankyou
<!DOCTYPE html>
<html>
<head>
<title>Grade Computation</title>
</head>
<body>
<form id="grade">
grade1: <input type="type" id="g1"></input>
grade2: <input type="type" id="g2"></input>
grade3: <input type="type" id="g3"></input>
<input type="button" value="compute" onclick="compute()"></input>
<script>
function compute() {
var total =((g1+g2+g3)/3)
alert("Average: " + total);
}
</script>
</body>
</html>