which code can be considered free floaters ? I am java beginner and I want to know how can I figure out free floater code.
public class Ocz2{
//Ocz2 obj = new Ocz2();
int a[] ;
a=new int[3];
}
In the above code, I am not able to figure out why it is throwing error on line 3. same declaration(line 3 & 4) doesn't throw any error inside method. But from error and google search I got to know it is because free floater code. Kindly help.
Yes your line
a=new int[3];
Is free floater as it doesn't belong to a block, constructor or a function. Java doesn't allow free floating code.
Wrap your line in any block, constructor or in a function.
Problem with your class do not have any function. Therefore , the correct way would be using main function.
public class Ocz2{
public static void main(String args[]){
//Ocz2 obj = new Ocz2();
int a[] ;
a=new int[3];
}
}
I am trying to set some custom(from hexcode or rgb value) color to a xssfcellBut the color of the cell is becoming black even though I am giving some other color
I got Runtime error time: 006 memory: 4386816 signal:-1 for the following code on ideone
When java producer sends the data any message broker(MB) queue/topic like Apache Kafka/active MQ, it serializes the data and sends the dataDoes MB deserializes the data and then storing it or just stores the object as it is(in serialized form)?