def a = 1 //local variable b = 2 //global variable a //error b //this works //closure example timesTwo = {x -> x*2} timesTwo(4) timesTwo("Multiplying Strings!") sin(3.1415) import java.nio.charset.Charset; byte[] cp1251Bytes = new byte[3]; cp1251Bytes[0] = (byte) 0xFD; cp1251Bytes[1] = (byte) 0xFE; cp1251Bytes[2] = (byte) 0xFF; byte[] utfBytes = new byte[6]; utfBytes[0] = (byte) 0xD1; utfBytes[1] = (byte) 0x8D; utfBytes[2] = (byte) 0xD1; utfBytes[3] = (byte) 0x8E; utfBytes[4] = (byte) 0xD1; utfBytes[5] = (byte) 0x8F; String cp1251Str = new String(cp1251Bytes, Charset.forName("CP1251")); byte[] utfBb = cp1251Str.getBytes(Charset.forName("UTF-8")); for(byte b: utfBb){ System.out.print((String.format("%x", b))); } new Plot( title: new String(cp1251Bytes, Charset.forName("CP1251")), xLabel: new String(utfBb, Charset.forName("UTF-8")), yLabel: new String(utfBytes, Charset.forName("UTF-8"))) 3 + 2 beakerx.getCodeCells('tg1')[0].outputs