Soldato
hi andy. can you link to the video training you're bought and howd you'd rate them so far? is something i'd like to do too
Standard input and output... generally (though not always) the keyboard and the console respectively.
hi andy. can you link to the video training you're bought and howd you'd rate them so far? is something i'd like to do too
public class EvenOddString {
static String[] output = new String[2];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numberOfWords = sc.nextInt();
sc.nextLine();
for (int j = 0; j < numberOfWords; j++) {
String string = sc.nextLine();
int length = string.length();
String evens = "";
String odds = "";
// collect the even letters
for (int i = 0; i < length; i += 2) {
evens = evens + string.charAt(i);
}
// collect the odd letters
for (int k = 1; k < length; k += 2) {
odds = odds + string.charAt(k);
}
output[j] = (evens + " " + odds);
}
for (int x = 0; x < numberOfWords; x++) {
System.out.println(output[x]);
}
}
}
The first one I signed up to is this one. It's over 60 hours in content with lots of challenges along the way (which probably at least doubles the course time, if not more). Doing 30 mins to an hour a day, I think this would take around 3 months for me to do. I'm 26% of the way in and it does seem very thorough.
The second one is this one. I feel the guy is explaining more in the early stages and I think I'd have done better to start here and then run the first along side it as I go. Only 12 hours of content, no challenges but a few quiz's. I'm 25% of the way in and at this point it's not covered a lot of what Tim has in the first, but at the same time there's a lot more things that clicked and make sense to me now.
A small update. I finished the second video course a couple of days ago, so it took me just under 3 weeks, doing an hour or so a day. Mind you, watching video was probably only around a third/half of the time I would spend coding/learning. I've been stopping and taking notes, screenshots (annotated) as I go, to give me something to refer back to.
I'm now back on the first video course (Java Masterclass) with Tim B, and I think things are making a little more sense. I still find Tim sometimes assumes some knowledge when explaining something and loses me.
Right now, while learning about Abstract Classes and Interfaces (I think I have them locked down from the second course tbh) I'm installing the Android Developer Studio and I'm going to make a start into the Android course that Tim has done too. I guess the first 10% or so will be very simple stuff, but I'd like to at least get a look at how Android apps are made now, then we'll see which I'll work through more/quicker, Java or Android.
I'm getting on okay with the 30 Days of Code on HackerRank. It was pleasing today that I managed to do the challenge about Linked List and then Exceptions, pretty much just using my own notes and not needing to look for answers in the 'discussion' tab. Green ticks first time!
So, still enjoying it. Progress feels slow, but it is still progress!
Very sorry mate, it's been about a year since I've done that course so I can't specifically remember how the time is broken up.Thanks, for the book there looks to be a new version of Jan 2017 which included Nougat, have added it to my wishlist.
Thanks for the link to the course, I think I've looked at one of them, but would maybe start with the beginners course first.
Beginners says 4 weeks... intermediate says 60 hours? Any idea how that works? 4 weeks doing how much each day? 60 hours or video content?
Congrats mate! No small feat getting your first app or 2 out there!So not directly linked to Java as the title suggests, but I've published my first (two) Android apps...
Yep, completely agree on the learn by doing front.Thanks. At the moment I'm switching between Tim's Java course and Rob's Android course. I feel I should work through the Java one first but 1) Tim is quite slow and not the best teacher 2) the Android one is allowing me to actually get some apps/projects out there... hence I'm doing bits of both.
I have a couple of basic app ideas, one a copy of one I use now but has stopped being developed and another fairly simple one. Neither are very exciting, but give me a goal of something to work towards. There is no doubt the best way to learn is to do, doing these two apps I was googling how to do all kinds of (fairly simple) things. (Locking an app in portrait, changing theme colours, debugging an error on my Pixel where the image was simply too big)
public class SAXHandler extends DefaultHandler{
private TrafficEvent newTrafficEvent;
private String content;
private String latitude;
private String longitude;
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
super.startElement(uri, localName, qName, attributes);
if(qName.equals("title")){
newTrafficEvent = new TrafficEvent();
}
}
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
switch (qName){
case "title":
newTrafficEvent.title = content;
break;
case "road":
newTrafficEvent.road = content;
break;
case "category":
newTrafficEvent.delay = content;
break;
case "latitude":
latitude = content;
break;
case "longitude":
longitude = content;
newTrafficEvent.location = new LatLng(Double.parseDouble(latitude), Double.parseDouble(longitude));
break;
case "description":
newTrafficEvent.description = content;
Traffic.trafficEvents.add(newTrafficEvent);
break;
}
}
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
content = String.copyValueOf(ch, start, length).trim();
}
}
Can anyone help me? I'm trying to parse an xml file located here http://m.highways.gov.uk/feeds/rss/AllEvents.xml
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Trafficwatch NI Incidents</title>
<link>http://www.trafficwatchni.com/</link>
<description>A listing of incidents in Northern Ireland.</description>
<language>en-gb</language>
<pubDate>Fri, 19 May 2017 09:54:00 +0000</pubDate>
<atom:link href="http://rss.trafficwatchni.com/trafficwatchni_incidents_rss.xml" rel="self" type="application/rss+xml" />
<item>
<title>Co Down Ballynahinch Rd (Hillsborough - Annahilt) REOPENED, , Ballynahinch Road, Annahilt</title>
<description><![CDATA[
.
]]></description>
<pubDate>Fri, 19 May 2017 09:58:14 +0000</pubDate>
<guid isPermaLink="false">TWNIIncident19055996</guid>
</item>
</channel>
</rss>