thanks a lot... that was helpful
shoysmTP
Posts
-
unexpected identifier: quick question -
unexpected identifier: quick questionvar tempDiv = "
";
divs.push(tempDiv);is this code valid in javascript? i'm getting error in chrome console that says unexpected identifier the error is on first line.
-
compile error: string is private with powershella very beginner question... i'm a newbie in programming... just started java and read about packaging... i created i directory called firstproject and put a directory with one class inside of it and a FirstProject source file in the firstproject directory itself. i made a class in that package directory that has a private string in it and tried to invoke from FirstProject source file but getting compile error that the string is private... i tried changing the string into protected or even public but still getting this error... this is the class src file...
package stickers;
public class Sticker
{
private String note;Sticker(String note)
{
this.note = note;
}public void displayNote()
{
System.out.println(note);
}
}this is the FirstProject src file...
package firstproject;
import stickers.Sticker;
public class FirstProject
{
public static void main(String[] args)
{
Sticker sticker = new Sticker("hello sticky mehdi");
sticker.displayNote();
}
}this is the actuall error: error: Sticker(String) is not public in Sticker; cannot be accessed from outside package