# Expected DOT, found 'array name'

**URL:** <https://discourse.processing.org/t/expected-dot-found-array-name/22347>\
**Category:** Beginners\
**Created:** [July 3, 2020, 2:13am UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347 "2020-07-03T02:13:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![what42](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@what42](https://discourse.processing.org/u/what42)\
**Post date:** [July 3, 2020, 2:13am UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/1 "2020-07-03T02:13:26Z")

</div>

I think I’ve found a bug with the IDE. If it’s not a bug, please tell what I’m doing wrong. Whenever I have something like this

```auto
byte[] TestByteArray = new byte[] {
  0b0
};

```

it gives me this error:  
expecting DOT, found ‘TestByteArray’

I also don’t know if the code formatting worked, so I’ll just have to hope it did

Edit: Apparently it did work  
Also, this is the only code I have in this project, and it only throws an error if I use 0b. If I use numbers, or even 0x then it will work, but not 0b. (there’s no other code because I ran into this problem on another project and I wanted to isolate it to make sure nothing else was causing it)

Edit 2: I just realized is it because you can’t do 0b0? I could have sworn that was a thing

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 3, 2020, 2:46am UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/2 "2020-07-03T02:46:32Z")

</div>

It does not seem to like this:

> [@what42](#):
>
> ```auto
> 0b0
> 
> ```

Works if you just use a 0.

Tried this:

```auto
byte b = 0b00001111;

byte[] TestByteArray = new byte[] {b};

void setup() 
	{
  size(640, 360);
  println(TestByteArray[0]);
	}

void draw() 
	{
  background(0);
	}

```

---

<div class="post-metadata">

**Author:** ![what42](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@what42](https://discourse.processing.org/u/what42)\
**Post date:** [July 3, 2020, 2:52am UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/3 "2020-07-03T02:52:03Z")

</div>

so you can use 0b0 just not in an array?

---

<div class="post-metadata">

**Author:** ![what42](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@what42](https://discourse.processing.org/u/what42)\
**Post date:** [July 3, 2020, 2:54am UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/4 "2020-07-03T02:54:33Z")

</div>

also, it seems like you can’t do  
`println (0b00001111);`  
but you can do  
`println (0xF);`

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 3, 2020, 8:08pm UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/5 "2020-07-03T20:08:47Z")

</div>

> [@what42](#):
>
> ```auto
> byte[] TestByteArray = new byte[] {
> 0b0
> };
> 
> ```

```auto
byte[] TestByteArray = new byte[] {
  (byte) 0xb0
};

```

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 4, 2020, 11:42pm UTC](https://discourse.processing.org/t/expected-dot-found-array-name/22347/6 "2020-07-04T23:42:17Z")

</div>

> [@what42](#):
>
> println (0b00001111);

Processing 3 uses Java 8.  
I have been working around things like this as they arise.  
I tried using binary literals for some masking and had to go back to hexadecimal.

Processing 4 uses Java 11 and does not have these errors for the few examples I tried:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1a0602fc38c6a6ab6746895f23cb27e3dea18431.png)

[https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html](https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html)

`:)`
