Καλή αρχή!
![Smile :)](./images/smilies/icon_biggrin.gif)
λογικα θα μας ενημερωσου στο eclass και θα κανουμε εκει εγγραφη οπως και με τα προηγουμενα εργαστηρια..και τοτε θα ξεκινησουνHazard wrote:Τελικα αυριο εχουμε κανονικα εργαστηριο με τις ωρες που λεει στο προγραμμα η θα ξεκινησουν τα εργαστηρια απ την αλλη εβδομαδα?
παντα πιστευω υπαρχει ενημερωση..οπως ειπε σημερα κι ο κατερινης για το φροντιστηριο του δικου του μαθηματο..ειπε δεν θα γινει αυτη τη βδομαδα αλλα την αλλη και θα ενημερωθουμε...αρα παντα ενημερωνομαστε χαχαHazard wrote:Ετσι πιστευω κι εγω αλλα απ'τη στιγμη που χωριστηκαμε αλφαβητικα σε αιθουσες και σε συγκεκριμενες ωρες θεωρουν ισως οτι ειναι αυτονοητο να ειμαστε εκει.Πραγματικα δε ξερω αν ειναι να παω αυριο η οχι.
Code: Select all
class Simulator {
protected static float time;
protected int x;
}
class SimDemo {
public static void main(String [] args){
Simulator ob1=new Simulator();
Simulator ob2=new Simulator();
ob1.x=10;
ob2.x=20;
System.out.println(“ob1.x and ob2.x are independent, ob1.x: ” + ob1.x + “,
ob2.x: ” + ob2.x);
ob1.time=66; ob2.time=99;
System.out.println(“static variable time can be accessed through class name,
Simuator.time: ” + Simulator.time + “, ob1.time: ” + ob1.time + “,
ob2.time:” + ob2.time);
Το πρόγραμμα όπως το έχεις παραθέσει έχει σφάλματα, ένα εκ των οποίων είναι και invalid characters.fox0077 wrote:Δοκιμάζω να τρέξω στο netbeans κάποιο από τα προγράμματα που μας έχει στις διαφάνειες, αλλά βγάζει error... Γιατι;;![]()
Code: Select all
class Simulator { protected static float time; protected int x; } class SimDemo { public static void main(String [] args){ Simulator ob1=new Simulator(); Simulator ob2=new Simulator(); ob1.x=10; ob2.x=20; System.out.println(“ob1.x and ob2.x are independent, ob1.x: ” + ob1.x + “, ob2.x: ” + ob2.x); ob1.time=66; ob2.time=99; System.out.println(“static variable time can be accessed through class name, Simuator.time: ” + Simulator.time + “, ob1.time: ” + ob1.time + “, ob2.time:” + ob2.time);
HINT: Μην κάνεις απευθείας copy-paste το code από τις διαφάνειες. (αν έχεις κάνει κάτι τέτοιο)Console wrote: ob1.x and ob2.x are independent, ob1.x: 10, ob2.x: 20
static variable time can be accessed through class name, Simuator.time: 99.0, ob1.time: 99.0, ob2.time:99.0
"Always keep a low profile. Cause when you get high, things can become strange."
"Never stop doing things you like. Never stop loving people you love. Never give up. Believe in yourself. Believe in your hidden powers."
"Honesty is an expensive gift, so don't expect it from cheap people."
HINT: Οι χαρακτήρες [“ ”] όπως είναι εκεί είναι invalid. Δοκίμασε [" "], έχει σημασία, εκτός αν είναι θέμα encoding. Αν και αυτό ξεκάθαρα δεν είναι το μοναδικό σφάλμα στο παραπάνω πρόγραμμα.fox0077 wrote:Μα δεν έχει invalid characters... Γιατι με copy paste δεν δουλευει;
"Always keep a low profile. Cause when you get high, things can become strange."
"Never stop doing things you like. Never stop loving people you love. Never give up. Believe in yourself. Believe in your hidden powers."
"Honesty is an expensive gift, so don't expect it from cheap people."
Ναι ναι συμφωνώpgetsos wrote:Επίσης να προτείνω να δοκιμάσετε και το εξαιρετικό IntelliJ IDEA που λόγω πανεπιστημίου μπορείτε να έχετε free την ultimate edition
Δες αυτό: https://www.jetbrains.com/buy/classroom/?product=ideafox0077 wrote:Μπορεις να επισυναψεις το link; Το πανεπιστημιο μας δινει καποιο κωδικο γι αυτο;
Χμμ...leecher wrote:best java ide
"Always keep a low profile. Cause when you get high, things can become strange."
"Never stop doing things you like. Never stop loving people you love. Never give up. Believe in yourself. Believe in your hidden powers."
"Honesty is an expensive gift, so don't expect it from cheap people."
Code: Select all
class Car
{
protected boolean _idle;
public Car(boolean idle) {_idle=idle;}
public boolean isIdle() {return idle;}
}
Code: Select all
protected int _speed;
public void pedal() {_speed=_speed+10;}
"Always keep a low profile. Cause when you get high, things can become strange."
"Never stop doing things you like. Never stop loving people you love. Never give up. Believe in yourself. Believe in your hidden powers."
"Honesty is an expensive gift, so don't expect it from cheap people."