Create secret messages
I would suggest following:


Do not compare strings by ==, use String.equals(). And in Your case is better String.isEmpty()

text != "" &rarr; !text.isEmpty()
Use constants for numbers and strings. It increases readability and futher refactoring.

private static final String WORD_SEPARATOR = " ";
There is no need to use indexed iterations

for(int j=0;j&lt;arry.length;j++) &rarr; for (String s : arry)
Use IDE with spelling checker:

arry &rarr; array
Use meaning variable names.

String s &rarr; String word
No need to use cast:

int number = (int) sd[0]; &rarr; int number = sd[0];
Decrease level of visibility

public static String encryptThis &rarr; static String encryptThis
Use method extraction to decrease nesting level

private static StringBuilder encrypt(char[] wordChars, int number)
You add first char in any case so condition can be omitted.
You could use chain of method .append(...) calls for StringBuilder
It is nice to move conditions like k==1 to meaningful named method:

See isSecondChar(...)
It is nice to validate input params early and prevent any actions if it is not valid:

if(text!="") &rarr; if (text.equals("")) then return empty string;


I would strongly suggest you to read great Joshua Bloch 'Effective Java' book. 

Have a look at the refactored code:

class NewEnpc {

    private static final String WORD_SEPARATOR = " ";

    static String encryptThis(String text) {
        if (text.isEmpty()) {
            return text;
        }
        StringBuilder result = new StringBuilder();
        String[] words = text.split(WORD_SEPARATOR);
        for (String word : words) {
            char[] wordChars = word.toCharArray();
            result.append((int) wordChars[0])
                    .append(encrypt(wordChars))
                    .append(" ");
        }
        return result.toString().trim();
    }

    private static StringBuilder encrypt(char[] wordChars) {
        StringBuilder encrypted = new StringBuilder();
        for (int index = 1; index &lt; wordChars.length; index++) {
            if (isSecondChar(index)) {
                int len = wordChars.length - 1;
                encrypted.append(wordChars[len]);
            } else if (isLastChar(index, wordChars.length - 1)) {
                encrypted.append(wordChars[1]);
            } else {
                encrypted.append(wordChars[index]);
            }
        }
        return encrypted;
    }

    private static boolean isLastChar(int currentIndex, int prevCharIndex) {
        return currentIndex == prevCharIndex;
    }

    private static boolean isSecondChar(int currentIndex) {
        return isLastChar(currentIndex, 1);
    }
}

public class EncryPt {
    public static void main(String[] args) {
        System.out.println("Hello");
        System.out.println(NewEnpc.encryptThis("A wise old owl lived in an oak"));
    }
}