Wednesday, May 27, 2015

Primitive variables in Java


 If you want to copy the code, it is written below.




public class Application {
    public static void main(String[] args) {
      
            int myNumber=88;
            short myShort= 867;
            long myLong= 9797;
           
            double myDouble= 7.3243;
            float myFloat= 324.3f;
           
            char myChar = 'y';
            boolean myBoolean = true;
           
            byte myByte=127;
           
            System.out.println(myNumber);
            System.out.println(myShort);
            System.out.println(myLong);
            System.out.println(myDouble);
            System.out.println(myFloat);
            System.out.println(myChar);
            System.out.println(myBoolean);
            System.out.println(myByte);
}

}

Hello World in Java


public class Application {

    public static void main(String[] args) {
        System.out.println("Hello World!");
     }

}


Monday, February 16, 2015

How to write in Python online?

Do you want to run a python code without having to download the program and install it?  It is pretty easy, just go to the next link , write the code and run it. The output will appear on the right window:

http://www.codeskulptor.org/

Wednesday, November 12, 2014

How to print a blank line in python?

If you want the blank line to be printed...

....after your string just add "\n"at the end of it, like in this example:

print  "hello\n"

and  blank line will be printed after "hello".

.... before your string just add "\n" in the beggining of  it, like in this example:

print "\nhello"

.... in other cases, just write the word print, like in this example:

print 


Sunday, November 9, 2014

How to unlock the keyboard on windows 8

If, as I actually did, you got by accident, your keyboard locked on windows 8, just watch the video below to find out how to solve your problem:


Wednesday, October 29, 2014

How to create a string array on VBA?

Dim myarray As Variant
myarray = Array("this", "is", "an", "array")