In your RDF file, the knows
property uses the default namespace, which is set to http://www.semanticweb.org/acer/ontologies/2014/2/untitled-ontology-73#
in that file's prefix declarations. In your query, however, you are using the property foaf:knows
. In your example code this prefix is not declared in your query (and therefore the query is incorrect), but I see in the comments that you've added a prefix declaration for it later (tip: update your question).
So, you have properties http://www.semanticweb.org/acer/ontologies/2014/2/untitled-ontology-73#knows
in your database, but you query for http://xmlns.com/foaf/0.1/knows
. See the problem? Everything works fine, you're just querying for the wrong property.
On a more general note: simply copy-pasting code from the web is not really the best way to learn how to use these tools. I suggest you work your way through one of the Jena tutorials which teach you a bit more about the how and why. This will make your life a lot easier in the longer run.