Abigail Decan

Ranch Hand
+ Follow
since Mar 06, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abigail Decan

no i didn't search the forums.
but the "solution" isn't working for me either.
5 years ago


This code does nothing to my statusbar.
i use applet viewer for my applet.
i googled, but i didn't find relevant help.
5 years ago
i pretty much re-typed the code from the oracle tutorial for sockets, but somehow it's not working.

i ran with

java Server 7
java Client localhost 7

with two consoles open.
i entered an input string for the Client console, but i'm not getting any echoes back.

i've checked and rechecked but i can't find what's missing.

Client.java


Server.java


the original codes are below:
http://docs.oracle.com/javase/tutorial/networking/sockets/examples/EchoClient.java
http://docs.oracle.com/javase/tutorial/networking/sockets/examples/EchoServer.java
5 years ago
so there are actually two numerical values associated to a character: it's unicode code point and the encoded value in the file?
there's only one codepoint for the character, but depending on the file type, you can use various encoding method to encode the unicode into a byte.

if i got this right, i think i understand better now.

thanks
5 years ago
when casting a char which is read from a file to an int, can i assume that the mapping used will be ASCII?
i've learned that unicode uses ASCII mappings for the characters that overlap.

are there any other possibilities for int values of one character?

i still have trouble understanding character encodings.
5 years ago
thanks, i'll definitely incorporate that
5 years ago
sorry for the late reply.
i've been forcing myself to research before i ask.
it sometimes is still frustrating to not get answers immediately, but i think i'm getting used to it.

i have another question now:
when you learn new methods and classes or a new language in general with a tutorial, should you take notes so you can look back later?
or is it better to just do more programming and remember stuff that way?
how much should notetaking come into learning a new language?
5 years ago
text file:



error message from command line:


C:\Users\xxxx\Desktop\COMP268\applet_ComponentArch_DynamicTreeDemo\applet_Comp
onentArch_DynamicTreeDemo\build\classes>jar -cvfm DynamicTreeDemo.jar mymanifest
.txt appletComponentArch
java.io.IOException: invalid header field name: ?≫?Codebase
at java.util.jar.Attributes.read(Attributes.java:433)
at java.util.jar.Manifest.read(Manifest.java:199)
at java.util.jar.Manifest.<init>(Manifest.java:69)
at sun.tools.jar.Main.run(Main.java:172)
at sun.tools.jar.Main.main(Main.java:1177)
[/code]
encoding in UTF-8 and have newline at end

5 years ago
i really have a lot of trouble coming up with class design problems such as

design a class to conduct a survey of three hospitals. you want to know how many sectors (eg operation, children, gastronomic) each hospitals have, and how many doctors there are in each sector.

what is the process of class design?
5 years ago
- a stream is something that tracks what i'm doing with the resource = file
- this is expensive
- so i want to to enable this so long as i'm actually using the resource
- therefore i close at the end of my session?

thanks for the help
5 years ago
i don't understand what close() does exactly.

i read the API and went to stackflow, but i still can't get a grasp.
for example, what does "releasing the resource" mean?
i understood so far that closing a stream means that the program can no longer access whatever file it opened.

5 years ago
i was confused between the two, so i did research.
again, i would appreciate it if someone could confirm.


interface:
methods - abstract, default, static ONLY
(abstract methods have no body, while static and defaults do, right?)
fields - public, static, final ONLY

abstract class: a normal class, but has at least one abstract method
methods - all
ie static, non-static, abstract (can it have a default method?)
fields - all
ie public, protected, private / final, non-final / static, non-static

thank you!
5 years ago
i have cookie and javascript enabled on my chrome, but i can't download the tutorial zip from
http://www.oracle.com/technetwork/java/javase/downloads/java-se-7-tutorial-2012-02-28-1536013.html

i have chrome, windows 7, and i'm the administrator for this computer.
5 years ago
thank you.
so the conclusion is that jvm is a translator from .class to executables for each type of processor?
5 years ago
I did my own reasearch on jvm, and i would appreciate it if someone could confirm my answers.

a jvm is is a software that has its own compiler and interpreter.
the compiler translates .java files into .class files (written in bytecode; not sure bytecode is yet) for the interpreter to execute.
a normal program is executed by the computer's CPU. therefore, performance of the program is platform-dependent.
but java programs are executed by the jvm, and not the computer, so java programs performs the same on different computers.
in other words the jvm assures that the program is executed in the same environment across all platforms.
5 years ago