Aug 31 2009

Quick Intro to the Ternary Operator

The Ternary Operator

The ternary operator is a source of confusion for many beginning programmers. In case you don’t know what the ternary operator is, it looks something like

String message = (isvalid?"Valid":"Invalid");

The ? represents the thought that goes through their head when they see it and they probably won’t get to the : .
Continue reading


Aug 27 2009

Multithreaded String Permutations

This code snippet is designed to take in a string an print out every possible permutation of that string. The only problem I’ve encountered so far is that it uses a lot of memory with longer strings.

Continue reading