Q:

Can i write java code in processings IDE? 

When I google it I find tutorials on how to use Processing in eclipse.  I was wondering if there was a way to do the opposite. 

A:

Yes.  Processing is written in Java, so you can write Java in Processing. 
You shouldn't have to do anything special.  It should pretty much "just work" out of the box. 
Here's a small example:
import javax.swing. JOptionPane;

void draw(){}

void mousePressed(){
  JOptionPane.showMessageDialog(null, "hello world");
}

